Struct paralegal_spdg::rustc::mir::BlockTailInfo
source · pub struct BlockTailInfo {
pub tail_result_is_ignored: bool,
pub span: Span,
}
Expand description
BlockTailInfo
is attached to the LocalDecl
for temporaries
created during evaluation of expressions in a block tail
expression; that is, a block like { STMT_1; STMT_2; EXPR }
.
It is used to improve diagnostics when such temporaries are involved in borrow_check errors, e.g., explanations of where the temporaries come from, when their destructors are run, and/or how one might revise the code to satisfy the borrow checker’s rules.
Fields§
§tail_result_is_ignored: bool
If true
, then the value resulting from evaluating this tail
expression is ignored by the block’s expression context.
Examples include { ...; tail };
and let _ = { ...; tail };
but not e.g., let _x = { ...; tail };
span: Span
Span
of the tail expression.
Auto Trait Implementations§
impl RefUnwindSafe for BlockTailInfo
impl !Send for BlockTailInfo
impl !Sync for BlockTailInfo
impl Unpin for BlockTailInfo
impl UnwindSafe for BlockTailInfo
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