Skip to content

Commit 74d3ef5

Browse files
author
The Miri Conjob Bot
committed
Merge from rustc
2 parents ba8a29d + 53689f2 commit 74d3ef5

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

src/diagnostics.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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);

tests/pass/overflow_checks_off.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,17 @@
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+
1015
fn main() {
1116
assert_eq!(-{ -0x80i8 }, -0x80);
1217

0 commit comments

Comments
 (0)