diff options
| author | Ben Kimock <kimockb@gmail.com> | 2022-10-26 07:14:20 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-10-26 07:14:20 -0700 |
| commit | bd947632b5da12ccb28a446a62898862f8f415ed (patch) | |
| tree | b94aeaa6e945ca0f9650463e03f1da4528eafbe7 | |
| parent | 0c3ae7d97ca36a86a8122429bdc274356c43baa6 (diff) | |
| download | rust-bd947632b5da12ccb28a446a62898862f8f415ed.tar.gz rust-bd947632b5da12ccb28a446a62898862f8f415ed.zip | |
Update library/core/src/ptr/mod.rs
Co-authored-by: Ralf Jung <post@ralfj.de>
| -rw-r--r-- | library/core/src/ptr/mod.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/library/core/src/ptr/mod.rs b/library/core/src/ptr/mod.rs index 2c19c27681f..3fd61755903 100644 --- a/library/core/src/ptr/mod.rs +++ b/library/core/src/ptr/mod.rs @@ -591,6 +591,7 @@ pub const fn invalid_mut<T>(addr: usize) -> *mut T { /// the program has undefined behavior. In particular, the aliasing rules still apply: pointers /// and references that have been invalidated due to aliasing accesses cannot be used any more, /// even if they have been exposed! +/// /// Note that there is no algorithm that decides which provenance will be used. You can think of this /// as "guessing" the right provenance, and the guess will be "maximally in your favor", in the sense /// that if there is any way to avoid undefined behavior (while upholding all aliasing requirements), |
