pub enum OptFlag {
NoMemo,
NoTCO,
NoPeephole,
NoBorrow,
NoOptimize,
}Expand description
Per-function optimization control flags.
Annotations placed above ## To disable specific optimization passes
for that function. This gives the programmer explicit control when
an optimization hurts rather than helps (e.g., memoization on a function
whose body is cheaper than a hash lookup).
Variants§
NoMemo
## No Memo — disable auto-memoization (TLS FxHashMap cache)
NoTCO
## No TCO — disable tail-call elimination (loop conversion)
NoPeephole
## No Peephole — disable peephole patterns (swap, vec-fill, for-range, etc.)
NoBorrow
## No Borrow — disable readonly/mutable borrow analysis (&[T]/&mut [T] params)
NoOptimize
## No Optimize — disable ALL of the above (master switch)
Trait Implementations§
impl Copy for OptFlag
impl Eq for OptFlag
impl StructuralPartialEq for OptFlag
Auto Trait Implementations§
impl Freeze for OptFlag
impl RefUnwindSafe for OptFlag
impl Send for OptFlag
impl Sync for OptFlag
impl Unpin for OptFlag
impl UnwindSafe for OptFlag
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more