mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 21:05:02 +00:00
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:
parent
3d21d5e614
commit
91f2016ee1
4 changed files with 51 additions and 6 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue