Function core::intrinsics::assume [−][src]
pub unsafe extern "rust-intrinsic" fn assume(b: bool)
🔬 This is a nightly-only experimental API. (core_intrinsics
)
intrinsics are unlikely to ever be stabilized, instead they should be used through stabilized interfaces in the rest of the standard library
Expand description
通知优化器某个条件始终为 true。 如果条件为 false,则行为未定义的。
没有为该内部函数生成任何代码,但是优化器将尝试在通过之间保留它 (及其条件),这可能会干扰周围代码的优化并降低性能。 如果优化器可以自己发现不变量,或者它没有启用任何重要的优化,则不应使用它。
此内部函数没有稳定的对应对象。