[−][src]Enum rustc_middle::mir::visit::TyContext

pub enum TyContext {
    LocalDecl {
        local: Local,
        source_info: SourceInfo,
    },
    UserTy(Span),
    ReturnTy(SourceInfo),
    YieldTy(SourceInfo),
    Location(Location),
}

Extra information passed to visit_ty and friends to give context about where the type etc appears.

Variants

LocalDecl

Fields of LocalDecl

local: Local

The index of the local variable we are visiting.

source_info: SourceInfo

The source location where this local variable was declared.

UserTy(Span)

The inferred type of a user type annotation.

ReturnTy(SourceInfo)

The return type of the function.

YieldTy(SourceInfo)
Location(Location)

A type found at some location.

Trait Implementations

impl Debug for TyContext[src]

Auto Trait Implementations

impl RefUnwindSafe for TyContext

impl !Send for TyContext

impl !Sync for TyContext

impl Unpin for TyContext

impl UnwindSafe for TyContext

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<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]