1
Fork 0

Fix some totally useless suggestions

This commit is contained in:
Michael Goulet 2022-12-27 07:17:22 +00:00
parent d2404d6dca
commit 050bc95ce2
3 changed files with 3 additions and 13 deletions

View file

@ -896,7 +896,7 @@ impl<'a, 'b> ImportResolver<'a, 'b> {
let resolutions = resolutions.as_ref().into_iter().flat_map(|r| r.iter()); let resolutions = resolutions.as_ref().into_iter().flat_map(|r| r.iter());
let names = resolutions let names = resolutions
.filter_map(|(BindingKey { ident: i, .. }, resolution)| { .filter_map(|(BindingKey { ident: i, .. }, resolution)| {
if *i == ident { if i.name == ident.name {
return None; return None;
} // Never suggest the same name } // Never suggest the same name
match *resolution.borrow() { match *resolution.borrow() {

View file

@ -2,10 +2,7 @@ error[E0432]: unresolved import `my_core`
--> $DIR/extern-prelude-from-opaque-fail.rs:20:9 --> $DIR/extern-prelude-from-opaque-fail.rs:20:9
| |
LL | use my_core; LL | use my_core;
| ^^^^^^^ | ^^^^^^^ no `my_core` in the root
| |
| no `my_core` in the root
| help: a similar name exists in the module: `my_core`
error[E0432]: unresolved import `my_core` error[E0432]: unresolved import `my_core`
--> $DIR/extern-prelude-from-opaque-fail.rs:7:13 --> $DIR/extern-prelude-from-opaque-fail.rs:7:13

View file

@ -2,10 +2,7 @@ error[E0432]: unresolved import `main`
--> $DIR/inaccessible-test-modules.rs:5:5 --> $DIR/inaccessible-test-modules.rs:5:5
| |
LL | use main as x; LL | use main as x;
| ----^^^^^ | ^^^^^^^^^ no `main` in the root
| |
| no `main` in the root
| help: a similar name exists in the module: `main`
error[E0432]: unresolved import `test` error[E0432]: unresolved import `test`
--> $DIR/inaccessible-test-modules.rs:6:5 --> $DIR/inaccessible-test-modules.rs:6:5
@ -13,10 +10,6 @@ error[E0432]: unresolved import `test`
LL | use test as y; LL | use test as y;
| ^^^^^^^^^ no `test` in the root | ^^^^^^^^^ no `test` in the root
| |
help: a similar name exists in the module
|
LL | use test as y;
| ~~~~
help: consider importing this module instead help: consider importing this module instead
| |
LL | use test::test as y; LL | use test::test as y;