Skip to content

Commit fbafd36

Browse files
committed
disable diagnostic deduplication
1 parent f47732b commit fbafd36

File tree

3 files changed

+19
-0
lines changed

3 files changed

+19
-0
lines changed

src/tools/miri/src/lib.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,4 +143,7 @@ pub const MIRI_DEFAULT_ARGS: &[&str] = &[
143143
"-Zmir-keep-place-mention",
144144
"-Zmir-opt-level=0",
145145
"-Zmir-enable-passes=-CheckAlignment",
146+
// Deduplicating diagnostics means we miss events when tracking what happens during an
147+
// execution. Let's not do that.
148+
"-Zdeduplicate-diagnostics=no",
146149
];

src/tools/miri/tests/fail/const-ub-checks.stderr

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,14 @@ note: erroneous constant encountered
1010
LL | let _x = UNALIGNED_READ;
1111
| ^^^^^^^^^^^^^^
1212

13+
note: erroneous constant encountered
14+
--> $DIR/const-ub-checks.rs:LL:CC
15+
|
16+
LL | let _x = UNALIGNED_READ;
17+
| ^^^^^^^^^^^^^^
18+
|
19+
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
20+
1321
error: aborting due to 1 previous error
1422

1523
For more information about this error, try `rustc --explain E0080`.

src/tools/miri/tests/fail/erroneous_const2.stderr

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,14 @@ note: erroneous constant encountered
1010
LL | println!("{}", FOO);
1111
| ^^^
1212

13+
note: erroneous constant encountered
14+
--> $DIR/erroneous_const2.rs:LL:CC
15+
|
16+
LL | println!("{}", FOO);
17+
| ^^^
18+
|
19+
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
20+
1321
note: erroneous constant encountered
1422
--> $DIR/erroneous_const2.rs:LL:CC
1523
|

0 commit comments

Comments
 (0)