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 @@ -2136,6 +2136,9 @@ impl<F: FnPtr> fmt::Debug for F {
21362136
21372137/// Create a `const` raw pointer to a place, without creating an intermediate reference.
21382138///
2139+ /// `addr_of!(expr)` is equivalent to `&raw const expr`. The macro is *soft-deprecated*;
2140+ /// use `&raw const` instead.
2141+ ///
21392142/// Creating a reference with `&`/`&mut` is only allowed if the pointer is properly aligned
21402143/// and points to initialized data. For cases where those requirements do not hold,
21412144/// raw pointers should be used instead. However, `&expr as *const _` creates a reference
@@ -2210,6 +2213,9 @@ pub macro addr_of($place:expr) {
22102213
22112214/// Create a `mut` raw pointer to a place, without creating an intermediate reference.
22122215///
2216+ /// `addr_of_mut!(expr)` is equivalent to `&raw mut expr`. The macro is *soft-deprecated*;
2217+ /// use `&raw mut` instead.
2218+ ///
22132219/// Creating a reference with `&`/`&mut` is only allowed if the pointer is properly aligned
22142220/// and points to initialized data. For cases where those requirements do not hold,
22152221/// 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