Unreasonable "consider importing" suggestions #84081
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
A-resolve
Area: Name/path resolution done by `rustc_resolve` specifically
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
I made a typo text -> test and got a very strange suggestion.
https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=1fdd70937900d5a5443d66f0c200ada6
The current output is:
The import suggestions here are kind of nonsense.
(They are only suggested if
fs
is imported.)It seems like "consider importing one of these items instead" shouldn't suggest private items, at the very least in the case of external crates.
(For the current crate, maybe you wanted one of your own items to be available, but those should still probably be called out as being private items?)
The text was updated successfully, but these errors were encountered: