pub enum TempState {
Undefined,
Defined {
location: Location,
uses: usize,
valid: Result<(), ()>,
},
Unpromotable,
PromotedOut,
}
Expand description
State of a temporary during collection and promotion.
Variants
Undefined
No references to this temp.
Defined
One direct assignment and any number of direct uses. A borrow of this temp is promotable if the assigned value is qualified as constant.
Unpromotable
Any other combination of assignments/uses.
PromotedOut
This temp was part of an rvalue which got extracted during promotion and needs cleanup.
Implementations
sourceimpl TempState
impl TempState
pub fn is_promotable(&self) -> bool
Trait Implementations
impl Copy for TempState
impl Eq for TempState
impl StructuralEq for TempState
impl StructuralPartialEq for TempState
Auto Trait Implementations
impl RefUnwindSafe for TempState
impl Send for TempState
impl Sync for TempState
impl Unpin for TempState
impl UnwindSafe for TempState
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Layout
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference’s “Type Layout” chapter for details on type layout guarantees.
Size: 32 bytes
Size for each variant:
Undefined
: 0 bytesDefined
: 31 bytesUnpromotable
: 0 bytesPromotedOut
: 0 bytes