Enum rustc_infer::infer::error_reporting::need_type_info::UseDiagnostic[−][src]

enum UseDiagnostic<'tcx> {
    TryConversion {
        pre_ty: Ty<'tcx>,
        post_ty: Ty<'tcx>,
        span: Span,
    },
}

An observation about the use site of a type to be emitted as an additional note in an inference failure error.

Variants

TryConversion

Records the types inferred before and after From::from is called on the error value within the desugaring of the ? operator.

Fields of TryConversion

pre_ty: Ty<'tcx>post_ty: Ty<'tcx>span: Span

Implementations

impl UseDiagnostic<'_>[src]

fn descr(&self) -> &'static str[src]

Return a descriptor of the value at the use site

fn type_descr(&self) -> &'static str[src]

Return a descriptor of the type at the use site

fn applies_to(&self, span: Span) -> bool[src]

fn attach_note(&self, err: &mut DiagnosticBuilder<'_>)[src]

Auto Trait Implementations

impl<'tcx> !RefUnwindSafe for UseDiagnostic<'tcx>

impl<'tcx> !Send for UseDiagnostic<'tcx>

impl<'tcx> !Sync for UseDiagnostic<'tcx>

impl<'tcx> Unpin for UseDiagnostic<'tcx>

impl<'tcx> !UnwindSafe for UseDiagnostic<'tcx>

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