diff options
Diffstat (limited to 'src')
8 files changed, 9 insertions, 64 deletions
diff --git a/src/test/ui/lint/issue-70819-dont-override-forbid-in-same-scope.rs b/src/test/ui/lint/issue-70819-dont-override-forbid-in-same-scope.rs index 05d7d924c8f..c66037e9a73 100644 --- a/src/test/ui/lint/issue-70819-dont-override-forbid-in-same-scope.rs +++ b/src/test/ui/lint/issue-70819-dont-override-forbid-in-same-scope.rs @@ -21,8 +21,6 @@ fn forbid_first(num: i32) -> i32 { #![deny(unused)] //~^ ERROR: deny(unused) incompatible with previous forbid //~| WARNING being phased out - //~| ERROR: deny(unused) incompatible with previous forbid - //~| WARNING being phased out #![warn(unused)] #![allow(unused)] diff --git a/src/test/ui/lint/issue-70819-dont-override-forbid-in-same-scope.stderr b/src/test/ui/lint/issue-70819-dont-override-forbid-in-same-scope.stderr index 475410cecff..5093715decf 100644 --- a/src/test/ui/lint/issue-70819-dont-override-forbid-in-same-scope.stderr +++ b/src/test/ui/lint/issue-70819-dont-override-forbid-in-same-scope.stderr @@ -14,16 +14,5 @@ LL | #![forbid(forbidden_lint_groups)] = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #81670 <https://github.com/rust-lang/rust/issues/81670> -error: deny(unused) incompatible with previous forbid - --> $DIR/issue-70819-dont-override-forbid-in-same-scope.rs:21:13 - | -LL | #![forbid(unused)] - | ------ `forbid` level set here -LL | #![deny(unused)] - | ^^^^^^ overruled by previous forbid - | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! - = note: for more information, see issue #81670 <https://github.com/rust-lang/rust/issues/81670> - -error: aborting due to 2 previous errors +error: aborting due to previous error diff --git a/src/test/ui/lint/outer-forbid.rs b/src/test/ui/lint/outer-forbid.rs index 486ec3c4680..ba330258d11 100644 --- a/src/test/ui/lint/outer-forbid.rs +++ b/src/test/ui/lint/outer-forbid.rs @@ -17,10 +17,9 @@ #![forbid(unused, non_snake_case)] #![forbid(forbidden_lint_groups)] -#[allow(unused_variables)] //~ ERROR incompatible with previous +#[allow(unused_variables)] //~^ ERROR incompatible with previous //~| WARNING this was previously accepted by the compiler -//~| WARNING this was previously accepted by the compiler fn foo() {} #[allow(unused)] //~ ERROR incompatible with previous diff --git a/src/test/ui/lint/outer-forbid.stderr b/src/test/ui/lint/outer-forbid.stderr index d69157a8bb3..78145732105 100644 --- a/src/test/ui/lint/outer-forbid.stderr +++ b/src/test/ui/lint/outer-forbid.stderr @@ -16,7 +16,7 @@ LL | #![forbid(forbidden_lint_groups)] = note: for more information, see issue #81670 <https://github.com/rust-lang/rust/issues/81670> error: allow(unused) incompatible with previous forbid - --> $DIR/outer-forbid.rs:26:9 + --> $DIR/outer-forbid.rs:25:9 | LL | #![forbid(unused, non_snake_case)] | ------ `forbid` level set here @@ -28,7 +28,7 @@ LL | #[allow(unused)] = note: for more information, see issue #81670 <https://github.com/rust-lang/rust/issues/81670> error[E0453]: allow(nonstandard_style) incompatible with previous forbid - --> $DIR/outer-forbid.rs:30:9 + --> $DIR/outer-forbid.rs:29:9 | LL | #![forbid(unused, non_snake_case)] | -------------- `forbid` level set here @@ -36,18 +36,6 @@ LL | #![forbid(unused, non_snake_case)] LL | #[allow(nonstandard_style)] | ^^^^^^^^^^^^^^^^^ overruled by previous forbid -error: allow(unused_variables) incompatible with previous forbid - --> $DIR/outer-forbid.rs:20:9 - | -LL | #![forbid(unused, non_snake_case)] - | ------ `forbid` level set here -... -LL | #[allow(unused_variables)] - | ^^^^^^^^^^^^^^^^ overruled by previous forbid - | - = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! - = note: for more information, see issue #81670 <https://github.com/rust-lang/rust/issues/81670> - -error: aborting due to 4 previous errors +error: aborting due to 3 previous errors For more information about this error, try `rustc --explain E0453`. diff --git a/src/tools/clippy/tests/ui/match_same_arms.stderr b/src/tools/clippy/tests/ui/match_same_arms.stderr index e48451acfe8..7752a8a6ff2 100644 --- a/src/tools/clippy/tests/ui/match_same_arms.stderr +++ b/src/tools/clippy/tests/ui/match_same_arms.stderr @@ -107,24 +107,6 @@ LL | 1 => 2, = help: ...or consider changing the match arm bodies error: this `match` has identical arm bodies - --> $DIR/match_same_arms.rs:33:14 - | -LL | 3 => 2, //~ ERROR 3rd matched arms have same body - | ^ - | -note: same as this - --> $DIR/match_same_arms.rs:32:14 - | -LL | 2 => 2, //~ ERROR 2nd matched arms have same body - | ^ -help: consider refactoring into `2 | 3` - --> $DIR/match_same_arms.rs:32:9 - | -LL | 2 => 2, //~ ERROR 2nd matched arms have same body - | ^ - = help: ...or consider changing the match arm bodies - -error: this `match` has identical arm bodies --> $DIR/match_same_arms.rs:50:55 | LL | CommandInfo::External { name, .. } => name.to_string(), @@ -142,5 +124,5 @@ LL | CommandInfo::BuiltIn { name, .. } => name.to_string(), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ = help: ...or consider changing the match arm bodies -error: aborting due to 8 previous errors +error: aborting due to 7 previous errors diff --git a/src/tools/clippy/tests/ui/modulo_one.stderr b/src/tools/clippy/tests/ui/modulo_one.stderr index 2b2c6997338..34f762bbb92 100644 --- a/src/tools/clippy/tests/ui/modulo_one.stderr +++ b/src/tools/clippy/tests/ui/modulo_one.stderr @@ -46,12 +46,6 @@ LL | const ONE: u32 = 1 * 1; | = note: `-D clippy::identity-op` implied by `-D warnings` -error: the operation is ineffective. Consider reducing it to `1` - --> $DIR/modulo_one.rs:13:22 - | -LL | const ONE: u32 = 1 * 1; - | ^^^^^ - error: any number modulo 1 will be 0 --> $DIR/modulo_one.rs:17:5 | @@ -70,5 +64,5 @@ error: any number modulo -1 will panic/overflow or result in 0 LL | INT_MIN % NEG_ONE; // also caught by rustc | ^^^^^^^^^^^^^^^^^ -error: aborting due to 11 previous errors +error: aborting due to 10 previous errors diff --git a/src/tools/clippy/tests/ui/suspicious_operation_groupings.stderr b/src/tools/clippy/tests/ui/suspicious_operation_groupings.stderr index 96065699d32..dd6f2f6641d 100644 --- a/src/tools/clippy/tests/ui/suspicious_operation_groupings.stderr +++ b/src/tools/clippy/tests/ui/suspicious_operation_groupings.stderr @@ -7,12 +7,6 @@ LL | self.x == other.y && self.y == other.y && self.z == other.z = note: `-D clippy::suspicious-operation-groupings` implied by `-D warnings` error: this sequence of operators looks suspiciously like a bug - --> $DIR/suspicious_operation_groupings.rs:14:9 - | -LL | self.x == other.y && self.y == other.y && self.z == other.z - | ^^^^^^^^^^^^^^^^^ help: did you mean: `self.x == other.x` - -error: this sequence of operators looks suspiciously like a bug --> $DIR/suspicious_operation_groupings.rs:27:20 | LL | s1.a < s2.a && s1.a < s2.b @@ -162,5 +156,5 @@ error: this sequence of operators looks suspiciously like a bug LL | -(if -s1.a < -s2.a && -s1.a < -s2.b { s1.c } else { s2.a }) | ^^^^^^^^^^^^^ help: did you mean: `-s1.b < -s2.b` -error: aborting due to 27 previous errors +error: aborting due to 26 previous errors diff --git a/src/tools/rustfmt/src/syntux/session.rs b/src/tools/rustfmt/src/syntux/session.rs index 870f0acfe39..2965b0928aa 100644 --- a/src/tools/rustfmt/src/syntux/session.rs +++ b/src/tools/rustfmt/src/syntux/session.rs @@ -311,6 +311,7 @@ mod tests { suggestions: vec![], span: span.unwrap_or_else(MultiSpan::new), sort_span: DUMMY_SP, + is_lint: false, } } |
