-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Contradictory unused imports on traits #43970
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
Labels
C-bug
Category: This is a bug.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Comments
Why are private The warning disappears if |
Reproduction without any dependency mod test {
pub trait A {
fn a();
}
impl A for () {
fn a() { }
}
}
use test::A;
mod test2 {
use super::*;
pub fn b() {
let _ = <()>::a();
}
}
fn main() {
test2::b();
} |
nicokosi
added a commit
to nicokosi/pullpito
that referenced
this issue
May 8, 2018
warning: unused import: `super::*` --> src/github_events/mod.rs:121:9 | 121 | use super::*; | ^^^^^^^^ | = note: #[warn(unused_imports)] on by default warning: unused imports: `TimeZone`, `Utc` --> src/github_events/mod.rs:122:18 | 122 | use chrono::{TimeZone, Utc}; | ^^^^^^^^ ^^^ Seems an open issue: rust-lang/rust#43970
nicokosi
added a commit
to nicokosi/pullpito
that referenced
this issue
May 8, 2018
warning: unused import: `super::*` --> src/github_events/mod.rs:121:9 | 121 | use super::*; | ^^^^^^^^ | = note: #[warn(unused_imports)] on by default warning: unused imports: `TimeZone`, `Utc` --> src/github_events/mod.rs:122:18 | 122 | use chrono::{TimeZone, Utc}; | ^^^^^^^^ ^^^ Seems an open issue: rust-lang/rust#43970
Same as #45268. (this issue is older, but I'm building a list of "linkbacks" there) |
Closing as a duplicate. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
C-bug
Category: This is a bug.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Below generates an unused warning:
While removing the suggested offended line generates error:
Tested on
rustc 1.18.0 (03fc9d622 2017-06-06)
andrustc 1.21.0-nightly (59ccba995 2017-08-17)
with slightly different error message.Seems similar to symptom of #30159
The text was updated successfully, but these errors were encountered: