diff options
| author | Viktor Dahl <pazaconyoman@gmail.com> | 2014-10-16 14:20:54 +0200 |
|---|---|---|
| committer | Viktor Dahl <pazaconyoman@gmail.com> | 2014-10-16 14:20:54 +0200 |
| commit | 0c18da503ca674eb4cbf8504b52afb2d7c242ae5 (patch) | |
| tree | f8a4cdad3038d53fb53569be742a41ea7f64aa66 /src | |
| parent | 0525bb76690232ce1ce2a3918ce031e2058c41dc (diff) | |
| download | rust-0c18da503ca674eb4cbf8504b52afb2d7c242ae5.tar.gz rust-0c18da503ca674eb4cbf8504b52afb2d7c242ae5.zip | |
Improve documentation of assume intrinsic.
Diffstat (limited to 'src')
| -rw-r--r-- | src/libcore/intrinsics.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/libcore/intrinsics.rs b/src/libcore/intrinsics.rs index 5570d356149..674cb271b3f 100644 --- a/src/libcore/intrinsics.rs +++ b/src/libcore/intrinsics.rs @@ -259,7 +259,11 @@ extern "rust-intrinsic" { /// 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. + /// No code is generated for this intrinsic, but the optimizer will try + /// to preserve it (and its condition) between passes, which may interfere + /// with optimization of surrounding code and reduce performance. It should + /// not be used if the invariant can be discovered by the optimizer on its + /// own, or if it does not enable any significant optimizations. #[cfg(not(stage0))] pub fn assume(b: bool); |
