pub enum InvalidationReason {
ShapeUnrebuildable {
narrowed_ty: Type,
},
Write {
span: Span,
},
Reassignment {
span: Span,
},
CapturedMutator {
closure_span: Option<Span>,
},
}Expand description
Diagnostic-only record of why a narrowing was invalidated. Surfaced as a
help: line so the LLM doesn’t have to guess why a narrowing went away.
Variants§
ShapeUnrebuildable
A proven predicate had no source that codegen could rebuild in its region.
Write
A write reached the path (or a prefix of it) and falsified the guard: a field or index write, a loop back edge, or a merge of an inner block’s writes. Narrowings on the path and any extension of it are dropped.
Reassignment
An identifier was reassigned. Distinguished from Self::Write only so
the diagnostic can name the statement the reader is looking at.
CapturedMutator
Path root is in captured_mutators; the engine refused to install a NarrowedView. closure_span: one offending closure declaration.
Implementations§
Trait Implementations§
Source§impl Clone for InvalidationReason
impl Clone for InvalidationReason
Auto Trait Implementations§
impl Freeze for InvalidationReason
impl RefUnwindSafe for InvalidationReason
impl Send for InvalidationReason
impl Sync for InvalidationReason
impl Unpin for InvalidationReason
impl UnsafeUnpin for InvalidationReason
impl UnwindSafe for InvalidationReason
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