diff options
| author | bohan <bohan-zhang@foxmail.com> | 2024-02-17 00:55:35 +0800 |
|---|---|---|
| committer | bohan <bohan-zhang@foxmail.com> | 2024-03-06 21:17:12 +0800 |
| commit | 73030143818b99f0180a259b161cacd175b7d775 (patch) | |
| tree | a8822fd0a9f6d78a7d7c4296cd15b3079c7bd9ae /compiler/rustc_resolve/src/ident.rs | |
| parent | 09bc67b9158392361780e779d32997f14cc75c39 (diff) | |
| download | rust-73030143818b99f0180a259b161cacd175b7d775.tar.gz rust-73030143818b99f0180a259b161cacd175b7d775.zip | |
avoid overlapping privacy suggestion for single nested imports
Diffstat (limited to 'compiler/rustc_resolve/src/ident.rs')
| -rw-r--r-- | compiler/rustc_resolve/src/ident.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/rustc_resolve/src/ident.rs b/compiler/rustc_resolve/src/ident.rs index a9fdddbfab9..6518d9735ae 100644 --- a/compiler/rustc_resolve/src/ident.rs +++ b/compiler/rustc_resolve/src/ident.rs @@ -868,7 +868,7 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> { .into_iter() .find_map(|binding| if binding == ignore_binding { None } else { binding }); - if let Some(Finalize { path_span, report_private, used, .. }) = finalize { + if let Some(Finalize { path_span, report_private, used, root_span, .. }) = finalize { let Some(binding) = binding else { return Err((Determined, Weak::No)); }; @@ -881,6 +881,7 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> { dedup_span: path_span, outermost_res: None, parent_scope: *parent_scope, + single_nested: path_span != root_span, }); } else { return Err((Determined, Weak::No)); |
