This issue is
I implemented a suggestion for typoed crate or module in #89347. However there are still some edge cases.
Given the following code:
https://play.rust-lang.org/?version=nightly&mode=debug&edition=2018&gist=36133bfa20fc000bce25b7b1ea075df9
The current output is:
error[E0433]: failed to resolve: use of undeclared crate or module `my_cor`
--> $DIR/extern-prelude-from-opaque-fail.rs:10:5
|
LL | my_cor::mem::drop(0);
| ^^^^^^ use of undeclared crate or module `my_cor`
|
help: there is a crate or module with a similar name
|
LL | my_core::mem::drop(0);
| ~~~~~~~
error: aborting due to previous error
For more information about this error, try `rustc --explain E0433`.
However if you apply this suggestion, you get a compiler error like the following.
error[E0433]: failed to resolve: use of undeclared crate or module `my_core`
--> $DIR/extern-prelude-from-opaque-fail.rs:10:5
|
LL | my_core::mem::drop(0);
| ^^^^^^^ use of undeclared crate or module `my_core`
error: aborting due to previous error
For more information about this error, try `rustc --explain E0433`.
Ideally the output should look like:
The compiler shouldn't suggest a crate or module name which you can't use.
error[E0433]: failed to resolve: use of undeclared crate or module `my_cor`
--> $DIR/extern-prelude-from-opaque-fail.rs:10:5
|
LL | my_cor::mem::drop(0);
| ^^^^^^ use of undeclared crate or module `my_cor`
|
error: aborting due to previous error
For more information about this error, try `rustc --explain E0433`.
#89347 (comment) might help you.
Other things to do: #89347 (comment)
This issue is
I implemented a suggestion for typoed crate or module in #89347. However there are still some edge cases.
Given the following code:
https://play.rust-lang.org/?version=nightly&mode=debug&edition=2018&gist=36133bfa20fc000bce25b7b1ea075df9
The current output is:
However if you apply this suggestion, you get a compiler error like the following.
Ideally the output should look like:
The compiler shouldn't suggest a crate or module name which you can't use.
#89347 (comment) might help you.
Other things to do: #89347 (comment)