Insert error after checking for binding usability.
This commit is contained in:
parent
24b37a7374
commit
55ca03c0ac
1 changed files with 6 additions and 6 deletions
|
@ -913,12 +913,6 @@ impl<'a> Resolver<'a> {
|
||||||
return Err((Determined, Weak::No));
|
return Err((Determined, Weak::No));
|
||||||
};
|
};
|
||||||
|
|
||||||
if !restricted_shadowing && binding.expansion != LocalExpnId::ROOT {
|
|
||||||
if let NameBindingKind::Res(_, true) = binding.kind {
|
|
||||||
self.macro_expanded_macro_export_errors.insert((path_span, binding.span));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// If the primary binding is unusable, search further and return the shadowed glob
|
// If the primary binding is unusable, search further and return the shadowed glob
|
||||||
// binding if it exists. What we really want here is having two separate scopes in
|
// binding if it exists. What we really want here is having two separate scopes in
|
||||||
// a module - one for non-globs and one for globs, but until that's done use this
|
// a module - one for non-globs and one for globs, but until that's done use this
|
||||||
|
@ -965,6 +959,12 @@ impl<'a> Resolver<'a> {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if !restricted_shadowing && binding.expansion != LocalExpnId::ROOT {
|
||||||
|
if let NameBindingKind::Res(_, true) = binding.kind {
|
||||||
|
self.macro_expanded_macro_export_errors.insert((path_span, binding.span));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
self.record_use(ident, binding, restricted_shadowing);
|
self.record_use(ident, binding, restricted_shadowing);
|
||||||
return Ok(binding);
|
return Ok(binding);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue