Suggestion for a typoed crate or module results in compile error #89592
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
A-suggestion-diagnostics
Area: Suggestions generated by the compiler applied by `cargo fix`
D-invalid-suggestion
Diagnostics: A structured suggestion resulting in incorrect code.
D-papercut
Diagnostics: An error or lint that needs small tweaks.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
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)
The text was updated successfully, but these errors were encountered: