Skip to content

Commit 827e518

Browse files
committed
stacked borrows is broken without full MIR
1 parent c93f6d6 commit 827e518

34 files changed

+13
-4
lines changed

README.md

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,14 +45,19 @@ in this directory.
4545
## Running Miri
4646

4747
```sh
48-
cargo +nightly run tests/run-pass/vecs.rs # Or whatever test you like.
48+
cargo +nightly run -- -Zmiri-disable-validation tests/run-pass/vecs.rs # Or whatever test you like.
4949
```
5050

51+
We have to disable validation because that can lead to errors when libstd is not
52+
compiled the right way.
53+
5154
## Running Miri with full libstd
5255

53-
Per default libstd does not contain the MIR of non-polymorphic functions. When
54-
Miri hits a call to such a function, execution terminates. To fix this, it is
55-
possible to compile libstd with full MIR:
56+
Per default libstd does not contain the MIR of non-polymorphic functions, and
57+
also does not contain some extra MIR statements that miri needs for validation.
58+
When Miri hits a call to such a function, execution terminates, and even when
59+
the MIR is present, validation can fail. To fix this, it is possible to compile
60+
libstd with full MIR:
5661

5762
```sh
5863
rustup component add --toolchain nightly rust-src

0 commit comments

Comments
 (0)