add miri-track-caller to some intrinsic-exposing methods

This commit is contained in:
Ralf Jung
2022-07-24 14:28:30 -04:00
parent 35a0617248
commit d10a7b1243
7 changed files with 38 additions and 0 deletions

View File

@@ -96,6 +96,7 @@ use crate::intrinsics;
#[inline]
#[stable(feature = "unreachable", since = "1.27.0")]
#[rustc_const_stable(feature = "const_unreachable_unchecked", since = "1.57.0")]
#[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces
pub const unsafe fn unreachable_unchecked() -> ! {
// SAFETY: the safety contract for `intrinsics::unreachable` must
// be upheld by the caller.