diff options
| author | Matthias Krüger <476013+matthiaskrgr@users.noreply.github.com> | 2025-04-01 20:25:21 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-04-01 20:25:21 +0200 |
| commit | 068594e3652bc47155f1377bad146d5b1c67e9f5 (patch) | |
| tree | 2542e64138934836d11737be5690201c7a2828c6 /compiler/rustc_resolve/src/imports.rs | |
| parent | cdd69d6dc3fd05b594726c881b1ebd8ca8d63669 (diff) | |
| parent | 26cfa6f819e10fa597766d8c5549b86e503ff288 (diff) | |
| download | rust-068594e3652bc47155f1377bad146d5b1c67e9f5.tar.gz rust-068594e3652bc47155f1377bad146d5b1c67e9f5.zip | |
Rollup merge of #138790 - xizheyin:issue-138626, r=compiler-errors
Note potential but private items in show_candidates Closes #138626 . We should add potential private items to give ample hints. And for the other seemingly false positive ` pub use crate::one::Foo;` should be kept because we don't know if the user wants to import other module's items or not, and therefore should be given the full option to do so. r? compiler
Diffstat (limited to 'compiler/rustc_resolve/src/imports.rs')
| -rw-r--r-- | compiler/rustc_resolve/src/imports.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_resolve/src/imports.rs b/compiler/rustc_resolve/src/imports.rs index 454460e10dc..0b3633a452c 100644 --- a/compiler/rustc_resolve/src/imports.rs +++ b/compiler/rustc_resolve/src/imports.rs @@ -734,7 +734,7 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> { &mut diag, Some(err.span), candidates, - DiagMode::Import { append: false }, + DiagMode::Import { append: false, unresolved_import: true }, (source != target) .then(|| format!(" as {target}")) .as_deref() |
