Struct rustc_middle::mir::BlockTailInfo[][src]

pub struct BlockTailInfo {
    pub tail_result_is_ignored: bool,
    pub span: Span,
}

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.

Trait Implementations

impl Clone for BlockTailInfo[src]

impl Debug for BlockTailInfo[src]

impl<'tcx, __D: TyDecoder<'tcx>> Decodable<__D> for BlockTailInfo[src]

impl<'tcx, __E: TyEncoder<'tcx>> Encodable<__E> for BlockTailInfo[src]

impl<'__ctx> HashStable<StableHashingContext<'__ctx>> for BlockTailInfo[src]

impl<'tcx> Lift<'tcx> for BlockTailInfo[src]

type Lifted = Self

impl<'tcx> TypeFoldable<'tcx> for BlockTailInfo[src]

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

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<'a, T> Captures<'a> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> MaybeResult<T> for T[src]

type Error = !

impl<'tcx, T> Subst<'tcx> for T where
    T: TypeFoldable<'tcx>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> WithConstness for T[src]