Rollup merge of #90202 - matthewjasper:xcrate-hygiene, r=petrochenkov
Improve and test cross-crate hygiene - Decode the parent expansion for traits and enums in `rustc_resolve`, this was already being used for resolution in typeck - Avoid suggesting importing names with def-site hygiene, since it's often not useful - Add more tests r? `@petrochenkov`
This commit is contained in:
commit
1a1f525bb0
27 changed files with 525 additions and 32 deletions
|
@ -842,9 +842,11 @@ impl<'a> Resolver<'a> {
|
|||
|
||||
// collect results based on the filter function
|
||||
// avoid suggesting anything from the same module in which we are resolving
|
||||
// avoid suggesting anything with a hygienic name
|
||||
if ident.name == lookup_ident.name
|
||||
&& ns == namespace
|
||||
&& !ptr::eq(in_module, parent_scope.module)
|
||||
&& !ident.span.normalize_to_macros_2_0().from_expansion()
|
||||
{
|
||||
let res = name_binding.res();
|
||||
if filter_fn(res) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue