mention null explicitly · rust-lang/rust@e30f8ae
@@ -1991,7 +1991,7 @@ impl<F: FnPtr> fmt::Debug for F {
19911991///
19921992/// The `expr` in `addr_of!(expr)` is evaluated as a place expression, but never loads
19931993/// from the place or requires the place to be dereferenceable. This means that
1994-/// `addr_of!(*ptr)` is defined behavior even if `ptr` is dangling or misaligned.
1994+/// `addr_of!(*ptr)` is defined behavior even if `ptr` is null, dangling, or misaligned.
19951995/// Note however that `addr_of!((*ptr).field)` still requires the projection to
19961996/// `field` to be in-bounds, using the same rules as [`offset`].
19971997///
@@ -2040,7 +2040,7 @@ pub macro addr_of($place:expr) {
20402040///
20412041/// The `expr` in `addr_of_mut!(expr)` is evaluated as a place expression, but never loads
20422042/// from the place or requires the place to be dereferenceable. This means that
2043-/// `addr_of_mut!(*ptr)` is defined behavior even if `ptr` is dangling or misaligned.
2043+/// `addr_of_mut!(*ptr)` is defined behavior even if `ptr` is null, dangling, or misaligned.
20442044/// Note however that `addr_of_mut!((*ptr).field)` still requires the projection to
20452045/// `field` to be in-bounds, using the same rules as [`offset`].
20462046///