In fact, this messiness is why there is an extra-experimental extra-strict mode of miri: -Zmiri-tag-raw-pointers.
To enable it, we need to pass it via a MIRIFLAGS environment variable like this:
MIRIFLAGS="-Zmiri-tag-raw-pointers" cargo +nightly-2022-01-21 miri test
Or like this on Windows, where you need to just set the variable globally:
$env:MIRIFLAGS="-Zmiri-tag-raw-pointers"cargo +nightly-2022-01-21 miri test
Today I tried running
MIRIFLAGS="-Zmiri-tag-raw-pointers" cargo +nightly miri test
but Miri says
error: unknown unstable option: miri-tag-raw-pointers
According to https://www.ralfj.de/blog/2022/07/02/miri.html, the option miri-tag-raw-pointers does not exist anymore and is currently on-by-default. Maybe this information could be included in the book.
Thanks for having made/making such a useful educational resource!
In chapter 6.5 of the book, it says
Today I tried running
MIRIFLAGS="-Zmiri-tag-raw-pointers" cargo +nightly miri test
but Miri sayserror: unknown unstable option: miri-tag-raw-pointers
According to https://www.ralfj.de/blog/2022/07/02/miri.html, the option
miri-tag-raw-pointers
does not exist anymore and is currently on-by-default. Maybe this information could be included in the book.Thanks for having made/making such a useful educational resource!