Auto merge of #116228 - bvanjoi:fix-116164, r=cjgillot
resolve: skip underscore character during candidate lookup Fixes #116164 In use statement, an underscore is merely a placeholder symbol and does not bind to any name. Therefore, it can be safely ignored.
This commit is contained in:
commit
16b7b39fdd
3 changed files with 37 additions and 0 deletions
|
@ -1169,6 +1169,10 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> {
|
|||
return;
|
||||
}
|
||||
|
||||
if ident.name == kw::Underscore {
|
||||
return;
|
||||
}
|
||||
|
||||
let child_accessible =
|
||||
accessible && this.is_accessible_from(name_binding.vis, parent_scope.module);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue