soft-deprecate the addr_of macros · patricklam/verify-rust-std@8bdd95b (original) (raw)
`@@ -2209,6 +2209,9 @@ impl<F: FnPtr> fmt::Debug for F {
`
2209
2209
``
2210
2210
`` /// Creates a const
raw pointer to a place, without creating an intermediate reference.
``
2211
2211
`///
`
``
2212
`` +
/// addr_of!(expr)
is equivalent to &raw const expr
. The macro is soft-deprecated;
``
``
2213
`` +
/// use &raw const
instead.
``
``
2214
`+
///
`
2212
2215
`` /// Creating a reference with &
/&mut
is only allowed if the pointer is properly aligned
``
2213
2216
`/// and points to initialized data. For cases where those requirements do not hold,
`
2214
2217
`` /// raw pointers should be used instead. However, &expr as *const _
creates a reference
``
`@@ -2283,6 +2286,9 @@ pub macro addr_of($place:expr) {
`
2283
2286
``
2284
2287
`` /// Creates a mut
raw pointer to a place, without creating an intermediate reference.
``
2285
2288
`///
`
``
2289
`` +
/// addr_of_mut!(expr)
is equivalent to &raw mut expr
. The macro is soft-deprecated;
``
``
2290
`` +
/// use &raw mut
instead.
``
``
2291
`+
///
`
2286
2292
`` /// Creating a reference with &
/&mut
is only allowed if the pointer is properly aligned
``
2287
2293
`/// and points to initialized data. For cases where those requirements do not hold,
`
2288
2294
`` /// raw pointers should be used instead. However, &mut expr as *mut _
creates a reference
``