-
Notifications
You must be signed in to change notification settings - Fork 12.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Redundant import leaks prelude import #121312
Comments
This diagnostic is not specific to the redundant import lint, it's shown every time we refer to a declaration site of any prelude name. Those declarations are not compiler details, they are public APIs - https://doc.rust-lang.org/stable/std/prelude/rust_2021/index.html - so such diagnostics are at least acceptable. |
@petrochenkov that's fine but as opposed to the OP I have a different output (with
So I was confused why our CI started breaking out of blue and since I didn't see where the other location is it looked like a bug to me. |
@Kixunil |
@petrochenkov ah, OK, IIRC this was in CI using dtolnay's GH action. I guess it doesn't install std source for efficiency. |
Code
Current output
Desired output
Rationale and extra context
The
pub use core::prelude::rust_2021::*;
import is a compiler detail. The user did not write that line so it's confusing to display it to them.Other cases
No response
Rust Version
Anything else?
https://play.rust-lang.org/?version=nightly&mode=debug&edition=2021&gist=cafa3c0983d012f7430097f0fbd32e4f
The text was updated successfully, but these errors were encountered: