-
Notifications
You must be signed in to change notification settings - Fork 13.7k
Open
Labels
A-edition-2018Area: The 2018 editionArea: The 2018 editionA-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.Area: Lints (warnings about flaws in source code) such as unused_mut.C-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.T-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
Code like this:
fn main() {
test1::foo();
test2::foo();
}
mod test1 {
use std;
pub fn foo() {
std::mem::drop(3);
}
}
mod test2 {
use std;
pub fn foo() {
std::println!("x");
}
}
when compiled yields no warnings currently. In theory, though, both imports of std
are unused due to the 2018 crate prelude!
cramertj
Metadata
Metadata
Assignees
Labels
A-edition-2018Area: The 2018 editionArea: The 2018 editionA-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.Area: Lints (warnings about flaws in source code) such as unused_mut.C-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.T-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.