diff options
| author | Ralf Jung <post@ralfj.de> | 2023-11-10 07:34:28 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-11-10 07:34:28 +0100 |
| commit | e30f8ae8672c89ba473aea8662fd5f22992810fb (patch) | |
| tree | b0db958e70d3f6a86118f23d97c75126161bc00d /library/core/src | |
| parent | 81af5b5031e346c5e2bdb8d0a88bf2904308a731 (diff) | |
| download | rust-e30f8ae8672c89ba473aea8662fd5f22992810fb.tar.gz rust-e30f8ae8672c89ba473aea8662fd5f22992810fb.zip | |
mention null explicitly
Co-authored-by: Josh Stone <cuviper@gmail.com>
Diffstat (limited to 'library/core/src')
| -rw-r--r-- | library/core/src/ptr/mod.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/library/core/src/ptr/mod.rs b/library/core/src/ptr/mod.rs index 12c6922eec0..289e234b669 100644 --- a/library/core/src/ptr/mod.rs +++ b/library/core/src/ptr/mod.rs @@ -1991,7 +1991,7 @@ impl<F: FnPtr> fmt::Debug for F { /// /// The `expr` in `addr_of!(expr)` is evaluated as a place expression, but never loads /// from the place or requires the place to be dereferenceable. This means that -/// `addr_of!(*ptr)` is defined behavior even if `ptr` is dangling or misaligned. +/// `addr_of!(*ptr)` is defined behavior even if `ptr` is null, dangling, or misaligned. /// Note however that `addr_of!((*ptr).field)` still requires the projection to /// `field` to be in-bounds, using the same rules as [`offset`]. /// @@ -2040,7 +2040,7 @@ pub macro addr_of($place:expr) { /// /// The `expr` in `addr_of_mut!(expr)` is evaluated as a place expression, but never loads /// from the place or requires the place to be dereferenceable. This means that -/// `addr_of_mut!(*ptr)` is defined behavior even if `ptr` is dangling or misaligned. +/// `addr_of_mut!(*ptr)` is defined behavior even if `ptr` is null, dangling, or misaligned. /// Note however that `addr_of_mut!((*ptr).field)` still requires the projection to /// `field` to be in-bounds, using the same rules as [`offset`]. /// |
