File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -505,7 +505,7 @@ pub fn report_msg<'tcx>(
505505 let is_local = machine. is_local ( frame_info) ;
506506 // No span for non-local frames and the first frame (which is the error site).
507507 if is_local && idx > 0 {
508- err. eager_subdiagnostic ( err. dcx , frame_info. as_note ( machine. tcx ) ) ;
508+ err. subdiagnostic ( err. dcx , frame_info. as_note ( machine. tcx ) ) ;
509509 } else {
510510 let sm = sess. source_map ( ) ;
511511 let span = sm. span_to_embeddable_string ( frame_info. span ) ;
Original file line number Diff line number Diff line change 11//@compile-flags: -C overflow-checks=off
22
33// Check that we correctly implement the intended behavior of these operators
4- // when they are not being overflow-checked.
4+ // when they are not being overflow-checked at runtime .
55
66// FIXME: if we call the functions in `std::ops`, we still get the panics.
77// Miri does not implement the codegen-time hack that backs `#[rustc_inherit_overflow_checks]`.
88// use std::ops::*;
99
10+
11+ // Disable _compile-time_ overflow linting
12+ // so that we can test runtime overflow checks
13+ #![ allow( arithmetic_overflow) ]
14+
1015fn main ( ) {
1116 assert_eq ! ( -{ -0x80i8 } , -0x80 ) ;
1217
You can’t perform that action at this time.
0 commit comments