-
-
Notifications
You must be signed in to change notification settings - Fork 15k
Unreasonable "consider importing" suggestions #84081
Copy link
Copy link
Closed
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsA-resolveArea: Name/path resolution done by `rustc_resolve` specificallyArea: Name/path resolution done by `rustc_resolve` specificallyT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Description
Metadata
Metadata
Assignees
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsA-resolveArea: Name/path resolution done by `rustc_resolve` specificallyArea: Name/path resolution done by `rustc_resolve` specificallyT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Type
Fields
Give feedbackNo fields configured for issues without a type.
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
fsis 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?)