-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
A-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.Area: Lints (warnings about flaws in source code) such as unused_mut.A-syntaxextArea: Syntax extensionsArea: Syntax extensionsE-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
Description
Example:
#![warn(unused_qualifications)]
use self::A::B;
#[deriving(PartialEq)]
pub enum A {
B,
}
fn main() {
}
Output:
a.rs:7:5: 7:6 warning: unnecessary qualification
a.rs:7 B,
^
note: in expansion of #[deriving]
a.rs:5:1: 5:23 note: expansion site
a.rs:1:9: 1:30 note: lint level defined here
a.rs:1 #![warn(unused_qualifications)]
^~~~~~~~~~~~~~~~~~~~~
a.rs:7:5: 7:6 warning: unnecessary qualification
a.rs:7 B,
^
note: in expansion of #[deriving]
a.rs:5:1: 5:23 note: expansion site
a.rs:1:9: 1:30 note: lint level defined here
a.rs:1 #![warn(unused_qualifications)]
^~~~~~~~~~~~~~~~~~~~~
a.rs:7:5: 7:6 warning: unnecessary qualification
a.rs:7 B,
^
note: in expansion of #[deriving]
a.rs:5:1: 5:23 note: expansion site
a.rs:1:9: 1:30 note: lint level defined here
a.rs:1 #![warn(unused_qualifications)]
^~~~~~~~~~~~~~~~~~~~~
a.rs:7:5: 7:6 warning: unnecessary qualification
a.rs:7 B,
^
note: in expansion of #[deriving]
a.rs:5:1: 5:23 note: expansion site
a.rs:1:9: 1:30 note: lint level defined here
a.rs:1 #![warn(unused_qualifications)]
^~~~~~~~~~~~~~~~~~~~~
This is something that wasn’t an issue before, but with the scoping of enum variants can very easily become a problem now.
Metadata
Metadata
Assignees
Labels
A-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.Area: Lints (warnings about flaws in source code) such as unused_mut.A-syntaxextArea: Syntax extensionsArea: Syntax extensionsE-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.