From faadd35ee5074aa85fa6e2078650b3e6f1fd4662 Mon Sep 17 00:00:00 2001 From: Tobias Bucher Date: Fri, 11 Aug 2017 03:42:36 +0200 Subject: [PATCH] Add `#[inline]` to `mem::unreachable` --- src/libcore/mem.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/libcore/mem.rs b/src/libcore/mem.rs index 045720b0268a..6f7adbe1e7a0 100644 --- a/src/libcore/mem.rs +++ b/src/libcore/mem.rs @@ -949,6 +949,7 @@ impl ::fmt::Debug for ManuallyDrop { /// NB: This is very different from the `unreachable!()` macro: Unlike the /// macro, which panics when it is executed, it is *undefined behavior* to /// reach code marked with this function. +#[inline] #[unstable(feature = "unreachable", issue = "43751")] pub unsafe fn unreachable() -> ! { intrinsics::unreachable()