diff options
| author | bohan <bohan-zhang@foxmail.com> | 2023-09-28 19:47:58 +0800 |
|---|---|---|
| committer | bohan <bohan-zhang@foxmail.com> | 2023-09-28 19:47:58 +0800 |
| commit | cfb819fa7e7dd16e756eca6d19ac78c7635436bd (patch) | |
| tree | a0544b761c8c51a98852818608c606bb898e1655 /compiler/rustc_resolve/src | |
| parent | 46da927abb389f646d9b0c500e5c386aec61ecf9 (diff) | |
| download | rust-cfb819fa7e7dd16e756eca6d19ac78c7635436bd.tar.gz rust-cfb819fa7e7dd16e756eca6d19ac78c7635436bd.zip | |
resolve: skip underscore character during candidate lookup
Diffstat (limited to 'compiler/rustc_resolve/src')
| -rw-r--r-- | compiler/rustc_resolve/src/diagnostics.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/compiler/rustc_resolve/src/diagnostics.rs b/compiler/rustc_resolve/src/diagnostics.rs index 907a6b1c46c..110286255c5 100644 --- a/compiler/rustc_resolve/src/diagnostics.rs +++ b/compiler/rustc_resolve/src/diagnostics.rs @@ -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); |
