Do not report missing unsafe on addr_of[_mut]!(EXTERN_OR_MUT_STATIC)

The compiler no longer does as well; see https://github.com/rust-lang/rust/pull/125834.
This commit is contained in:
Chayim Refael Friedman 2024-08-29 22:58:26 +03:00
parent 3d21d5e614
commit 91f2016ee1
4 changed files with 51 additions and 6 deletions

View file

@ -65,6 +65,7 @@
//! todo: panic
//! unimplemented: panic
//! column:
//! addr_of:
#![rustc_coherence_is_core]
@ -421,6 +422,17 @@ pub mod ptr {
}
// endregion:coerce_unsized
// endregion:non_null
// region:addr_of
#[rustc_macro_transparency = "semitransparent"]
pub macro addr_of($place:expr) {
&raw const $place
}
#[rustc_macro_transparency = "semitransparent"]
pub macro addr_of_mut($place:expr) {
&raw mut $place
}
// endregion:addr_of
}
pub mod ops {