about summary refs log tree commit diff
path: root/src/libcore
diff options
context:
space:
mode:
Diffstat (limited to 'src/libcore')
-rw-r--r--src/libcore/intrinsics.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/libcore/intrinsics.rs b/src/libcore/intrinsics.rs
index 3f7dcb36cf6..5570d356149 100644
--- a/src/libcore/intrinsics.rs
+++ b/src/libcore/intrinsics.rs
@@ -256,6 +256,13 @@ extern "rust-intrinsic" {
     /// NB: This is very different from the `unreachable!()` macro!
     pub fn unreachable() -> !;
 
+    /// Inform the optimizer that a condition is always true.
+    /// If the condition is false, the behavior is undefined.
+    ///
+    /// No code is generated for this intrisic.
+    #[cfg(not(stage0))]
+    pub fn assume(b: bool);
+
     /// Execute a breakpoint trap, for inspection by a debugger.
     pub fn breakpoint();