From 401aeaf6d3a6ec712ee46151faf574adaa5ff3c6 Mon Sep 17 00:00:00 2001 From: Keegan McAllister Date: Wed, 3 Sep 2014 12:00:08 -0700 Subject: Add intrinsics::unreachable --- src/libcore/intrinsics.rs | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/libcore') diff --git a/src/libcore/intrinsics.rs b/src/libcore/intrinsics.rs index a3d63bbe06c..7d86b65168f 100644 --- a/src/libcore/intrinsics.rs +++ b/src/libcore/intrinsics.rs @@ -250,6 +250,13 @@ extern "rust-intrinsic" { /// Abort the execution of the process. pub fn abort() -> !; + /// Tell LLVM that this point in the code is not reachable, + /// enabling further optimizations. + /// + /// NB: This is very different from the `unreachable!()` macro! + #[cfg(not(stage0))] + pub fn unreachable() -> !; + /// Execute a breakpoint trap, for inspection by a debugger. pub fn breakpoint(); -- cgit 1.4.1-3-g733a5