diff --git a/tests/ui/neg_multiply.fixed b/tests/ui/neg_multiply.fixed index 8546173cfd5..e4aa7fbadfa 100644 --- a/tests/ui/neg_multiply.fixed +++ b/tests/ui/neg_multiply.fixed @@ -1,6 +1,6 @@ // run-rustfix #![warn(clippy::neg_multiply)] -#![allow(clippy::no_effect, clippy::unnecessary_operation)] +#![allow(clippy::no_effect, clippy::unnecessary_operation, clippy::precedence)] use std::ops::Mul; diff --git a/tests/ui/neg_multiply.rs b/tests/ui/neg_multiply.rs index 9f48e4d9c12..e95da705dca 100644 --- a/tests/ui/neg_multiply.rs +++ b/tests/ui/neg_multiply.rs @@ -1,6 +1,6 @@ // run-rustfix #![warn(clippy::neg_multiply)] -#![allow(clippy::no_effect, clippy::unnecessary_operation)] +#![allow(clippy::no_effect, clippy::unnecessary_operation, clippy::precedence)] use std::ops::Mul; diff --git a/tests/ui/neg_multiply.stderr b/tests/ui/neg_multiply.stderr index 0a4bc074295..42d5dffb6a5 100644 --- a/tests/ui/neg_multiply.stderr +++ b/tests/ui/neg_multiply.stderr @@ -1,11 +1,3 @@ -error: operator precedence can trip the unwary - --> $DIR/neg_multiply.rs:38:5 - | -LL | 0xcafe | 0xff00 * -1; - | ^^^^^^^^^^^^^^^^^^^^ help: consider parenthesizing your expression: `0xcafe | (0xff00 * -1)` - | - = note: `-D clippy::precedence` implied by `-D warnings` - error: this multiplication by -1 can be written more succinctly --> $DIR/neg_multiply.rs:28:5 | @@ -44,5 +36,5 @@ error: this multiplication by -1 can be written more succinctly LL | 0xcafe | 0xff00 * -1; | ^^^^^^^^^^^ help: consider using: `-0xff00` -error: aborting due to 7 previous errors +error: aborting due to 6 previous errors