Skip to content

Commit

Permalink
Auto merge of #3305 - rust-lang:rustup-2024-02-18, r=saethlin
Browse files Browse the repository at this point in the history
Automatic Rustup
  • Loading branch information
bors committed Feb 18, 2024
2 parents 3589059 + a67c9e5 commit be32d79
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion rust-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4316d0c6252cb1f833e582dfa68adb98efd5ddfb
1f8e824f111c972c9df8dbb378d87c33f67bbad4
2 changes: 1 addition & 1 deletion src/diagnostics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -505,7 +505,7 @@ pub fn report_msg<'tcx>(
let is_local = machine.is_local(frame_info);
// No span for non-local frames and the first frame (which is the error site).
if is_local && idx > 0 {
err.eager_subdiagnostic(err.dcx, frame_info.as_note(machine.tcx));
err.subdiagnostic(err.dcx, frame_info.as_note(machine.tcx));
} else {
let sm = sess.source_map();
let span = sm.span_to_embeddable_string(frame_info.span);
Expand Down
6 changes: 5 additions & 1 deletion tests/pass/overflow_checks_off.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
//@compile-flags: -C overflow-checks=off

// Check that we correctly implement the intended behavior of these operators
// when they are not being overflow-checked.
// when they are not being overflow-checked at runtime.

// FIXME: if we call the functions in `std::ops`, we still get the panics.
// Miri does not implement the codegen-time hack that backs `#[rustc_inherit_overflow_checks]`.
// use std::ops::*;

// Disable _compile-time_ overflow linting
// so that we can test runtime overflow checks
#![allow(arithmetic_overflow)]

fn main() {
assert_eq!(-{ -0x80i8 }, -0x80);

Expand Down

0 comments on commit be32d79

Please sign in to comment.