Skip to content

Commit 7315b6d

Browse files
committed
Auto merge of rust-lang#2826 - yerke:yerke/add-tree-borrows-link, r=oli-obk
Add link for tree borrows similar to stacked borrows `@Vanille-N` does it look ok to you?
2 parents 3e523e9 + d16eca2 commit 7315b6d

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/tools/miri/README.md

+5-4
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ for example:
1515
or an invalid enum discriminant)
1616
* **Experimental**: Violations of the [Stacked Borrows] rules governing aliasing
1717
for reference types
18-
* **Experimental**: Violations of the Tree Borrows aliasing rules, as an optional
18+
* **Experimental**: Violations of the [Tree Borrows] aliasing rules, as an optional
1919
alternative to [Stacked Borrows]
2020
* **Experimental**: Data races
2121

@@ -79,6 +79,7 @@ behavior** in your program, and cannot run all programs:
7979
[`unreachable_unchecked`]: https://doc.rust-lang.org/stable/std/hint/fn.unreachable_unchecked.html
8080
[`copy_nonoverlapping`]: https://doc.rust-lang.org/stable/std/ptr/fn.copy_nonoverlapping.html
8181
[Stacked Borrows]: https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/stacked-borrows.md
82+
[Tree Borrows]: https://perso.crans.org/vanille/treebor/
8283

8384

8485
## Using Miri
@@ -359,7 +360,7 @@ to Miri failing to detect cases of undefined behavior in a program.
359360
* `-Zmiri-disable-data-race-detector` disables checking for data races. Using
360361
this flag is **unsound**. This implies `-Zmiri-disable-weak-memory-emulation`.
361362
* `-Zmiri-disable-stacked-borrows` disables checking the experimental
362-
aliasing rules to track borrows ([Stacked Borrows] and Tree Borrows).
363+
aliasing rules to track borrows ([Stacked Borrows] and [Tree Borrows]).
363364
This can make Miri run faster, but it also means no aliasing violations will
364365
be detected. Using this flag is **unsound** (but the affected soundness rules
365366
are experimental). Later flags take precedence: borrow tracking can be reactivated
@@ -425,7 +426,7 @@ to Miri failing to detect cases of undefined behavior in a program.
425426
* `-Zmiri-track-weak-memory-loads` shows a backtrace when weak memory emulation returns an outdated
426427
value from a load. This can help diagnose problems that disappear under
427428
`-Zmiri-disable-weak-memory-emulation`.
428-
* `-Zmiri-tree-borrows` replaces [Stacked Borrows] with the Tree Borrows rules.
429+
* `-Zmiri-tree-borrows` replaces [Stacked Borrows] with the [Tree Borrows] rules.
429430
The soundness rules are already experimental without this flag, but even more
430431
so with this flag.
431432
* `-Zmiri-force-page-size=<num>` overrides the default page size for an architecture, in multiples of 1k.
@@ -442,7 +443,7 @@ Some native rustc `-Z` flags are also very relevant for Miri:
442443
functions. This is needed so that Miri can execute such functions, so Miri
443444
sets this flag per default.
444445
* `-Zmir-emit-retag` controls whether `Retag` statements are emitted. Miri
445-
enables this per default because it is needed for [Stacked Borrows] and Tree Borrows.
446+
enables this per default because it is needed for [Stacked Borrows] and [Tree Borrows].
446447

447448
Moreover, Miri recognizes some environment variables:
448449

0 commit comments

Comments
 (0)