Skip to content

rustup https://github.com/rust-lang/rust/pull/71518/ #5544

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion tests/ui/implicit_saturating_sub.stderr
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
error: this arithmetic operation will overflow
--> $DIR/implicit_saturating_sub.rs:31:25
|
LL | let mut u_16: u16 = end_16 - start_16;
| ^^^^^^^^^^^^^^^^^ attempt to subtract with overflow
|
= note: `#[deny(arithmetic_overflow)]` on by default

error: Implicitly performing saturating subtraction
--> $DIR/implicit_saturating_sub.rs:13:5
|
Expand Down Expand Up @@ -184,5 +192,5 @@ LL | | i_64 -= 1;
LL | | }
| |_____^ help: try: `i_64 = i_64.saturating_sub(1);`

error: aborting due to 23 previous errors
error: aborting due to 24 previous errors