mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-28 20:16:58 +03:00
note wording: lint implied by lint group, not lint group implies lint
This commit is contained in:
@@ -483,16 +483,16 @@ pub fn raw_struct_lint<'a, S>(sess: &'a Session,
|
||||
flag, hyphen_case_lint_name));
|
||||
} else {
|
||||
let hyphen_case_flag_val = lint_flag_val.as_str().replace("_", "-");
|
||||
err.note(&format!("`{} {}` implies `{} {}`",
|
||||
flag, hyphen_case_flag_val, flag, hyphen_case_lint_name));
|
||||
err.note(&format!("`{} {}` implied by `{} {}`",
|
||||
flag, hyphen_case_lint_name, flag, hyphen_case_flag_val));
|
||||
}
|
||||
},
|
||||
Node(lint_attr_name, src) => {
|
||||
def = Some(src);
|
||||
if lint_attr_name.as_str().deref() != name {
|
||||
let level_str = level.as_str();
|
||||
err.note(&format!("#[{}({})] implies #[{}({})]",
|
||||
level_str, lint_attr_name, level_str, name));
|
||||
err.note(&format!("#[{}({})] implied by #[{}({})]",
|
||||
level_str, name, level_str, lint_attr_name));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,5 +11,5 @@
|
||||
#![deny(warnings)] //~ NOTE: lint level defined here
|
||||
use std::thread;
|
||||
//~^ ERROR: unused import
|
||||
//~| NOTE: #[deny(warnings)] implies #[deny(unused_imports)]
|
||||
//~| NOTE: #[deny(unused_imports)] implied by #[deny(warnings)]
|
||||
fn main() {}
|
||||
|
||||
@@ -4,7 +4,7 @@ error: variable `_InappropriateCamelCasing` should have a snake case name such a
|
||||
14 | let _InappropriateCamelCasing = true;
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: `-D bad-style` implies `-D non-snake-case`
|
||||
= note: `-D non-snake-case` implied by `-D bad-style`
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ error: variable `_InappropriateCamelCasing` should have a snake case name such a
|
||||
14 | let _InappropriateCamelCasing = true;
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: `-F bad-style` implies `-F non-snake-case`
|
||||
= note: `-F non-snake-case` implied by `-F bad-style`
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
||||
@@ -4,5 +4,5 @@ warning: variable `_InappropriateCamelCasing` should have a snake case name such
|
||||
14 | let _InappropriateCamelCasing = true;
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: `-W bad-style` implies `-W non-snake-case`
|
||||
= note: `-W non-snake-case` implied by `-W bad-style`
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ error: function `CamelCase` should have a snake case name such as `camel_case`
|
||||
14 | fn CamelCase() {}
|
||||
| ^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: #[deny(bad_style)] implies #[deny(non_snake_case)]
|
||||
= note: #[deny(non_snake_case)] implied by #[deny(bad_style)]
|
||||
note: lint level defined here
|
||||
--> $DIR/lint-group-style.rs:11:9
|
||||
|
|
||||
@@ -17,7 +17,7 @@ error: function `CamelCase` should have a snake case name such as `camel_case`
|
||||
22 | fn CamelCase() {}
|
||||
| ^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: #[forbid(bad_style)] implies #[forbid(non_snake_case)]
|
||||
= note: #[forbid(non_snake_case)] implied by #[forbid(bad_style)]
|
||||
note: lint level defined here
|
||||
--> $DIR/lint-group-style.rs:20:14
|
||||
|
|
||||
@@ -30,7 +30,7 @@ error: static variable `bad` should have an upper case name such as `BAD`
|
||||
24 | static bad: isize = 1;
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: #[forbid(bad_style)] implies #[forbid(non_upper_case_globals)]
|
||||
= note: #[forbid(non_upper_case_globals)] implied by #[forbid(bad_style)]
|
||||
note: lint level defined here
|
||||
--> $DIR/lint-group-style.rs:20:14
|
||||
|
|
||||
@@ -43,7 +43,7 @@ warning: function `CamelCase` should have a snake case name such as `camel_case`
|
||||
30 | fn CamelCase() {}
|
||||
| ^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: #[warn(bad_style)] implies #[warn(non_snake_case)]
|
||||
= note: #[warn(non_snake_case)] implied by #[warn(bad_style)]
|
||||
note: lint level defined here
|
||||
--> $DIR/lint-group-style.rs:28:17
|
||||
|
|
||||
@@ -56,7 +56,7 @@ warning: type `snake_case` should have a camel case name such as `SnakeCase`
|
||||
32 | struct snake_case;
|
||||
| ^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: #[warn(bad_style)] implies #[warn(non_camel_case_types)]
|
||||
= note: #[warn(non_camel_case_types)] implied by #[warn(bad_style)]
|
||||
note: lint level defined here
|
||||
--> $DIR/lint-group-style.rs:28:17
|
||||
|
|
||||
|
||||
@@ -4,7 +4,7 @@ error: variable `theTwo` should have a snake case name such as `the_two`
|
||||
19 | let theTwo = 2;
|
||||
| ^^^^^^
|
||||
|
|
||||
= note: #[deny(warnings)] implies #[deny(non_snake_case)]
|
||||
= note: #[deny(non_snake_case)] implied by #[deny(warnings)]
|
||||
note: lint level defined here
|
||||
--> $DIR/issue-24690.rs:16:9
|
||||
|
|
||||
@@ -17,7 +17,7 @@ error: variable `theOtherTwo` should have a snake case name such as `the_other_t
|
||||
20 | let theOtherTwo = 2;
|
||||
| ^^^^^^^^^^^
|
||||
|
|
||||
= note: #[deny(warnings)] implies #[deny(non_snake_case)]
|
||||
= note: #[deny(non_snake_case)] implied by #[deny(warnings)]
|
||||
|
||||
error: unused variable: `theOtherTwo`
|
||||
--> $DIR/issue-24690.rs:20:9
|
||||
@@ -25,7 +25,7 @@ error: unused variable: `theOtherTwo`
|
||||
20 | let theOtherTwo = 2;
|
||||
| ^^^^^^^^^^^
|
||||
|
|
||||
= note: #[deny(warnings)] implies #[deny(unused_variables)]
|
||||
= note: #[deny(unused_variables)] implied by #[deny(warnings)]
|
||||
note: lint level defined here
|
||||
--> $DIR/issue-24690.rs:16:9
|
||||
|
|
||||
|
||||
Reference in New Issue
Block a user