Skip to content

Commit 003eee9

Browse files
authored
Merge pull request rust-lang#192 from RalfJung/glossary-fmt
Glossary: de-bold paragraph headers
2 parents 09c0f97 + a3ebb89 commit 003eee9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: reference/src/glossary.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ The exact form of provenance in Rust is unclear.
6565
It is also unclear whether provenance applies to more than just pointers, i.e., one could imagine integers having provenance as well (so that pointer provenance can be preserved when pointers are cast to an integer and back).
6666
In the following, we give some examples if what provenance *could* look like.
6767

68-
**Using provenance to track originating allocation.**
68+
*Using provenance to track originating allocation.*
6969
For example, we have to distinguish pointers to the same location if they originated from different allocations.
7070
Cross-allocation pointer arithmetic [does not lead to usable pointers](https://doc.rust-lang.org/std/primitive.pointer.html#method.wrapping_offset), so the Rust Abstract Machine *somehow* has to remember the original allocation to which a pointer pointed.
7171
It could use provenance to achieve this:
@@ -91,7 +91,7 @@ assert_eq!(raw2 as usize, raw2_wrong as usize);
9191
This kind of provenance also exists in C/C++, but Rust is more permissive by (a) providing a [way to do pointer arithmetic across allocation boundaries without causing immediate UB](https://doc.rust-lang.org/std/primitive.pointer.html#method.wrapping_offset) (though, as we have seen, the resulting pointer still cannot be used for locations outside the allocation it originates), and (b) by allowing pointers to always be compared safely, even if their provenance differs.
9292
For some more information, see [this document proposing a more precise definition of provenance for C](http://www.open-std.org/jtc1/sc22/wg14/www/docs/n2364.pdf).
9393

94-
**Using provenance for Rust's aliasing rules.**
94+
*Using provenance for Rust's aliasing rules.*
9595
Another example of pointer provenance is the "tag" from [Stacked Borrows][stacked-borrows].
9696
For some more information, see [this blog post](https://www.ralfj.de/blog/2018/07/24/pointers-and-bytes.html).
9797

0 commit comments

Comments
 (0)