diff --git a/src/librustc/lint/context.rs b/src/librustc/lint/context.rs index 28600e3ab8eb..32bc81e94703 100644 --- a/src/librustc/lint/context.rs +++ b/src/librustc/lint/context.rs @@ -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)); } } } diff --git a/src/test/compile-fail/issue-30730.rs b/src/test/compile-fail/issue-30730.rs index 6082740f427d..086938334c78 100644 --- a/src/test/compile-fail/issue-30730.rs +++ b/src/test/compile-fail/issue-30730.rs @@ -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() {} diff --git a/src/test/ui/lint/command-line-lint-group-deny.stderr b/src/test/ui/lint/command-line-lint-group-deny.stderr index eafbf944dea9..23fac66cc6c9 100644 --- a/src/test/ui/lint/command-line-lint-group-deny.stderr +++ b/src/test/ui/lint/command-line-lint-group-deny.stderr @@ -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 diff --git a/src/test/ui/lint/command-line-lint-group-forbid.stderr b/src/test/ui/lint/command-line-lint-group-forbid.stderr index 0cf896060a27..0babd7f6fe47 100644 --- a/src/test/ui/lint/command-line-lint-group-forbid.stderr +++ b/src/test/ui/lint/command-line-lint-group-forbid.stderr @@ -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 diff --git a/src/test/ui/lint/command-line-lint-group-warn.stderr b/src/test/ui/lint/command-line-lint-group-warn.stderr index 4ffbff6cdb7e..998c892c7e34 100644 --- a/src/test/ui/lint/command-line-lint-group-warn.stderr +++ b/src/test/ui/lint/command-line-lint-group-warn.stderr @@ -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` diff --git a/src/test/ui/lint/lint-group-style.stderr b/src/test/ui/lint/lint-group-style.stderr index 93f6399b2272..9c0f4866af69 100644 --- a/src/test/ui/lint/lint-group-style.stderr +++ b/src/test/ui/lint/lint-group-style.stderr @@ -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 | diff --git a/src/test/ui/span/issue-24690.stderr b/src/test/ui/span/issue-24690.stderr index 623bb4a0d269..c4f2616f5945 100644 --- a/src/test/ui/span/issue-24690.stderr +++ b/src/test/ui/span/issue-24690.stderr @@ -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 |