about summary refs log tree commit diff
diff options
context:
space:
mode:
authorCamille GILLOT <gillot.camille@gmail.com>2023-04-18 17:24:40 +0000
committerCamille GILLOT <gillot.camille@gmail.com>2023-04-21 16:14:44 +0000
commit9f7e256ae787cb57d214f32775f3844435439f07 (patch)
tree3e5245ea5727f6d2368f3c5a0f2df01583c62d72
parented7e50e08b67eee7a6d1f4da897f204e3e70c6a0 (diff)
Bless miri.
-rw-r--r--src/tools/miri/tests/fail/const-ub-checks.stderr6
-rw-r--r--src/tools/miri/tests/fail/erroneous_const2.stderr14
-rw-r--r--src/tools/miri/tests/pass/track-alloc-1.rs6
-rw-r--r--src/tools/miri/tests/pass/track-alloc-1.stderr5
4 files changed, 20 insertions, 11 deletions
diff --git a/src/tools/miri/tests/fail/const-ub-checks.stderr b/src/tools/miri/tests/fail/const-ub-checks.stderr
index a8b7ea242b9..596a6bb4ca8 100644
--- a/src/tools/miri/tests/fail/const-ub-checks.stderr
+++ b/src/tools/miri/tests/fail/const-ub-checks.stderr
@@ -4,6 +4,12 @@ error[E0080]: evaluation of constant value failed
 LL |     ptr.read();
    |     ^^^^^^^^^^ accessing memory with alignment ALIGN, but alignment ALIGN is required
 
+note: erroneous constant used
+  --> $DIR/const-ub-checks.rs:LL:CC
+   |
+LL |     let _x = UNALIGNED_READ;
+   |              ^^^^^^^^^^^^^^
+
 error: aborting due to previous error
 
 For more information about this error, try `rustc --explain E0080`.
diff --git a/src/tools/miri/tests/fail/erroneous_const2.stderr b/src/tools/miri/tests/fail/erroneous_const2.stderr
index d41fcfd2302..9aad1fc9b02 100644
--- a/src/tools/miri/tests/fail/erroneous_const2.stderr
+++ b/src/tools/miri/tests/fail/erroneous_const2.stderr
@@ -4,6 +4,20 @@ error[E0080]: evaluation of constant value failed
 LL | const FOO: u32 = [X - Y, Y - X][(X < Y) as usize];
    |                   ^^^^^ attempt to compute `5_u32 - 6_u32`, which would overflow
 
+note: erroneous constant used
+  --> $DIR/erroneous_const2.rs:LL:CC
+   |
+LL |     println!("{}", FOO);
+   |                    ^^^
+
+note: erroneous constant used
+  --> $DIR/erroneous_const2.rs:LL:CC
+   |
+LL |     println!("{}", FOO);
+   |                    ^^^
+   |
+   = note: this note originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info)
+
 error: aborting due to previous error
 
 For more information about this error, try `rustc --explain E0080`.
diff --git a/src/tools/miri/tests/pass/track-alloc-1.rs b/src/tools/miri/tests/pass/track-alloc-1.rs
deleted file mode 100644
index 427c800dc51..00000000000
--- a/src/tools/miri/tests/pass/track-alloc-1.rs
+++ /dev/null
@@ -1,6 +0,0 @@
-// Ensure that tracking early allocations doesn't ICE Miri.
-// Early allocations are probably part of the runtime and therefore uninteresting, but they
-// shouldn't cause a crash.
-//@compile-flags: -Zmiri-track-alloc-id=1
-//@normalize-stderr-test: "[48] bytes" -> "SIZE bytes"
-fn main() {}
diff --git a/src/tools/miri/tests/pass/track-alloc-1.stderr b/src/tools/miri/tests/pass/track-alloc-1.stderr
deleted file mode 100644
index 7206edbb701..00000000000
--- a/src/tools/miri/tests/pass/track-alloc-1.stderr
+++ /dev/null
@@ -1,5 +0,0 @@
-note: tracking was triggered
-   |
-   = note: created extern static allocation of SIZE bytes (alignment ALIGN bytes) with id 1
-   = note: (no span available)
-