mirror of
https://github.com/rust-lang/rust.git
synced 2025-04-28 11:07:42 +00:00
rustc_resolve: unbox closures used in let bindings
This commit is contained in:
parent
a49cdb8c36
commit
1e4bbefae1
@ -1448,7 +1448,7 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> {
|
|||||||
let mut import_resolutions = module_.import_resolutions.borrow_mut();
|
let mut import_resolutions = module_.import_resolutions.borrow_mut();
|
||||||
let import_resolution = &mut (*import_resolutions)[target];
|
let import_resolution = &mut (*import_resolutions)[target];
|
||||||
{
|
{
|
||||||
let check_and_write_import = |namespace, result: &_, used_public: &mut bool| {
|
let mut check_and_write_import = |&mut: namespace, result: &_, used_public: &mut bool| {
|
||||||
let namespace_name = match namespace {
|
let namespace_name = match namespace {
|
||||||
TypeNS => "type",
|
TypeNS => "type",
|
||||||
ValueNS => "value",
|
ValueNS => "value",
|
||||||
@ -1691,7 +1691,7 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> {
|
|||||||
|
|
||||||
// Merge the child item into the import resolution.
|
// Merge the child item into the import resolution.
|
||||||
{
|
{
|
||||||
let merge_child_item = |namespace| {
|
let mut merge_child_item = |&mut : namespace| {
|
||||||
if name_bindings.defined_in_namespace_with(namespace, IMPORTABLE | PUBLIC) {
|
if name_bindings.defined_in_namespace_with(namespace, IMPORTABLE | PUBLIC) {
|
||||||
let namespace_name = match namespace {
|
let namespace_name = match namespace {
|
||||||
TypeNS => "type",
|
TypeNS => "type",
|
||||||
|
Loading…
Reference in New Issue
Block a user