This repository was archived by the owner on May 28, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -2209,6 +2209,9 @@ impl<F: FnPtr> fmt::Debug for F {
22092209
22102210/// Creates a `const` raw pointer to a place, without creating an intermediate reference.
22112211///
2212+ /// `addr_of!(expr)` is equivalent to `&raw const expr`. The macro is *soft-deprecated*;
2213+ /// use `&raw const` instead.
2214+ ///
22122215/// Creating a reference with `&`/`&mut` is only allowed if the pointer is properly aligned
22132216/// and points to initialized data. For cases where those requirements do not hold,
22142217/// raw pointers should be used instead. However, `&expr as *const _` creates a reference
@@ -2283,6 +2286,9 @@ pub macro addr_of($place:expr) {
22832286
22842287/// Creates a `mut` raw pointer to a place, without creating an intermediate reference.
22852288///
2289+ /// `addr_of_mut!(expr)` is equivalent to `&raw mut expr`. The macro is *soft-deprecated*;
2290+ /// use `&raw mut` instead.
2291+ ///
22862292/// Creating a reference with `&`/`&mut` is only allowed if the pointer is properly aligned
22872293/// and points to initialized data. For cases where those requirements do not hold,
22882294/// raw pointers should be used instead. However, `&mut expr as *mut _` creates a reference
You can’t perform that action at this time.
0 commit comments