File tree 1 file changed +6
-0
lines changed
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 {
2136
2136
2137
2137
/// Create a `const` raw pointer to a place, without creating an intermediate reference.
2138
2138
///
2139
+ /// `addr_of!(expr)` is equivalent to `&raw const expr`. The macro is *soft-deprecated*;
2140
+ /// use `&raw const` instead.
2141
+ ///
2139
2142
/// Creating a reference with `&`/`&mut` is only allowed if the pointer is properly aligned
2140
2143
/// and points to initialized data. For cases where those requirements do not hold,
2141
2144
/// raw pointers should be used instead. However, `&expr as *const _` creates a reference
@@ -2210,6 +2213,9 @@ pub macro addr_of($place:expr) {
2210
2213
2211
2214
/// Create a `mut` raw pointer to a place, without creating an intermediate reference.
2212
2215
///
2216
+ /// `addr_of_mut!(expr)` is equivalent to `&raw mut expr`. The macro is *soft-deprecated*;
2217
+ /// use `&raw mut` instead.
2218
+ ///
2213
2219
/// Creating a reference with `&`/`&mut` is only allowed if the pointer is properly aligned
2214
2220
/// and points to initialized data. For cases where those requirements do not hold,
2215
2221
/// 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