diff --git a/rust-version b/rust-version index ab6f899cd3..921a55d48c 100644 --- a/rust-version +++ b/rust-version @@ -1 +1 @@ -4316d0c6252cb1f833e582dfa68adb98efd5ddfb +1f8e824f111c972c9df8dbb378d87c33f67bbad4 diff --git a/src/diagnostics.rs b/src/diagnostics.rs index d47f446716..c1b404a2e3 100644 --- a/src/diagnostics.rs +++ b/src/diagnostics.rs @@ -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); diff --git a/tests/pass/overflow_checks_off.rs b/tests/pass/overflow_checks_off.rs index 79aa510ef9..831bffb6c5 100644 --- a/tests/pass/overflow_checks_off.rs +++ b/tests/pass/overflow_checks_off.rs @@ -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);