mirror of
https://github.com/rust-lang/rust.git
synced 2024-10-30 22:12:15 +00:00
Rollup merge of #100501 - RalfJung:miri-from-exposed-addr, r=Mark-Simulacrum
nicer Miri backtraces for from_exposed_addr Miri by default warns about using from_exposed_addr; this makes the span for that a bit nicer.
This commit is contained in:
commit
f8bdd9c680
@ -603,6 +603,7 @@ pub const fn invalid_mut<T>(addr: usize) -> *mut T {
|
||||
#[must_use]
|
||||
#[inline]
|
||||
#[unstable(feature = "strict_provenance", issue = "95228")]
|
||||
#[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces
|
||||
pub fn from_exposed_addr<T>(addr: usize) -> *const T
|
||||
where
|
||||
T: Sized,
|
||||
@ -639,6 +640,7 @@ where
|
||||
#[must_use]
|
||||
#[inline]
|
||||
#[unstable(feature = "strict_provenance", issue = "95228")]
|
||||
#[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces
|
||||
pub fn from_exposed_addr_mut<T>(addr: usize) -> *mut T
|
||||
where
|
||||
T: Sized,
|
||||
|
Loading…
Reference in New Issue
Block a user