remove exception

This commit is contained in:
James Dietz 2024-02-21 22:45:36 -05:00
parent 03f095f9f2
commit 669f891845
5 changed files with 8 additions and 9 deletions

View File

@ -3225,7 +3225,6 @@
"ui/nll/user-annotations/issue-55748-pat-types-constrain-bindings.rs", "ui/nll/user-annotations/issue-55748-pat-types-constrain-bindings.rs",
"ui/nll/user-annotations/issue-57731-ascibed-coupled-types.rs", "ui/nll/user-annotations/issue-57731-ascibed-coupled-types.rs",
"ui/numbers-arithmetic/issue-105626.rs", "ui/numbers-arithmetic/issue-105626.rs",
"ui/numbers-arithmetic/issue-8460-const.rs",
"ui/numbers-arithmetic/issue-8460.rs", "ui/numbers-arithmetic/issue-8460.rs",
"ui/object-safety/issue-102762.rs", "ui/object-safety/issue-102762.rs",
"ui/object-safety/issue-102933.rs", "ui/object-safety/issue-102933.rs",

View File

@ -13,7 +13,7 @@ LL | #![deny(arithmetic_overflow)]
error: this arithmetic operation will overflow error: this arithmetic operation will overflow
--> $DIR/lint-overflowing-ops.rs:226:15 --> $DIR/lint-overflowing-ops.rs:226:15
| |
LL | let _x = &(-i8::MIN); LL | let _n = &(-i8::MIN);
| ^^^^^^^^^^ attempt to negate `i8::MIN`, which would overflow | ^^^^^^^^^^ attempt to negate `i8::MIN`, which would overflow
error: this arithmetic operation will overflow error: this arithmetic operation will overflow
@ -775,7 +775,7 @@ LL | let _n = usize::MAX * 5;
error: this arithmetic operation will overflow error: this arithmetic operation will overflow
--> $DIR/lint-overflowing-ops.rs:225:14 --> $DIR/lint-overflowing-ops.rs:225:14
| |
LL | let _x = -i8::MIN; LL | let _n = -i8::MIN;
| ^^^^^^^^ attempt to negate `i8::MIN`, which would overflow | ^^^^^^^^ attempt to negate `i8::MIN`, which would overflow
error: this operation will panic at runtime error: this operation will panic at runtime

View File

@ -13,7 +13,7 @@ LL | #![deny(arithmetic_overflow)]
error: this arithmetic operation will overflow error: this arithmetic operation will overflow
--> $DIR/lint-overflowing-ops.rs:226:15 --> $DIR/lint-overflowing-ops.rs:226:15
| |
LL | let _x = &(-i8::MIN); LL | let _n = &(-i8::MIN);
| ^^^^^^^^^^ attempt to negate `i8::MIN`, which would overflow | ^^^^^^^^^^ attempt to negate `i8::MIN`, which would overflow
error: this arithmetic operation will overflow error: this arithmetic operation will overflow
@ -775,7 +775,7 @@ LL | let _n = usize::MAX * 5;
error: this arithmetic operation will overflow error: this arithmetic operation will overflow
--> $DIR/lint-overflowing-ops.rs:225:14 --> $DIR/lint-overflowing-ops.rs:225:14
| |
LL | let _x = -i8::MIN; LL | let _n = -i8::MIN;
| ^^^^^^^^ attempt to negate `i8::MIN`, which would overflow | ^^^^^^^^ attempt to negate `i8::MIN`, which would overflow
error: this operation will panic at runtime error: this operation will panic at runtime

View File

@ -13,7 +13,7 @@ LL | #![deny(arithmetic_overflow)]
error: this arithmetic operation will overflow error: this arithmetic operation will overflow
--> $DIR/lint-overflowing-ops.rs:226:15 --> $DIR/lint-overflowing-ops.rs:226:15
| |
LL | let _x = &(-i8::MIN); LL | let _n = &(-i8::MIN);
| ^^^^^^^^^^ attempt to negate `i8::MIN`, which would overflow | ^^^^^^^^^^ attempt to negate `i8::MIN`, which would overflow
error: this arithmetic operation will overflow error: this arithmetic operation will overflow
@ -775,7 +775,7 @@ LL | let _n = usize::MAX * 5;
error: this arithmetic operation will overflow error: this arithmetic operation will overflow
--> $DIR/lint-overflowing-ops.rs:225:14 --> $DIR/lint-overflowing-ops.rs:225:14
| |
LL | let _x = -i8::MIN; LL | let _n = -i8::MIN;
| ^^^^^^^^ attempt to negate `i8::MIN`, which would overflow | ^^^^^^^^ attempt to negate `i8::MIN`, which would overflow
error: this operation will panic at runtime error: this operation will panic at runtime

View File

@ -222,8 +222,8 @@ fn main() {
let _n = usize::MAX * 5; //~ ERROR: arithmetic operation will overflow let _n = usize::MAX * 5; //~ ERROR: arithmetic operation will overflow
let _n = &(usize::MAX * 5); //~ ERROR: arithmetic operation will overflow let _n = &(usize::MAX * 5); //~ ERROR: arithmetic operation will overflow
let _x = -i8::MIN; //~ ERROR this arithmetic operation will overflow let _n = -i8::MIN; //~ ERROR this arithmetic operation will overflow
let _x = &(-i8::MIN); //~ ERROR this arithmetic operation will overflow let _n = &(-i8::MIN); //~ ERROR this arithmetic operation will overflow
// Division // Division