rustc_resolve::late

Struct DiagMetadata

Source
struct DiagMetadata<'ast> {
Show 21 fields current_trait_assoc_items: Option<&'ast [P<AssocItem>]>, current_self_type: Option<Ty>, current_self_item: Option<NodeId>, current_item: Option<&'ast Item>, currently_processing_generic_args: bool, current_function: Option<(FnKind<'ast>, Span)>, unused_labels: FxHashMap<NodeId, Span>, current_block_could_be_bare_struct_literal: Option<Span>, current_let_binding: Option<(Span, Option<Span>, Option<Span>)>, current_pat: Option<&'ast Pat>, in_if_condition: Option<&'ast Expr>, in_assignment: Option<&'ast Expr>, is_assign_rhs: bool, in_non_gat_assoc_type: Option<bool>, in_range: Option<(&'ast Expr, &'ast Expr)>, current_trait_object: Option<&'ast [GenericBound]>, current_where_predicate: Option<&'ast WherePredicate>, current_type_path: Option<&'ast Ty>, current_impl_items: Option<&'ast [P<AssocItem>]>, currently_processing_impl_trait: Option<(TraitRef, Ty)>, current_elision_failures: Vec<MissingLifetime>,
}

Fields§

§current_trait_assoc_items: Option<&'ast [P<AssocItem>]>

The current trait’s associated items’ ident, used for diagnostic suggestions.

§current_self_type: Option<Ty>

The current self type if inside an impl (used for better errors).

§current_self_item: Option<NodeId>

The current self item if inside an ADT (used for better errors).

§current_item: Option<&'ast Item>

The current trait (used to suggest).

§currently_processing_generic_args: bool

When processing generic arguments and encountering an unresolved ident not found, suggest introducing a type or const param depending on the context.

§current_function: Option<(FnKind<'ast>, Span)>

The current enclosing (non-closure) function (used for better errors).

§unused_labels: FxHashMap<NodeId, Span>

A list of labels as of yet unused. Labels will be removed from this map when they are used (in a break or continue statement)

§current_block_could_be_bare_struct_literal: Option<Span>

Only used for better errors on let x = { foo: bar };. In the case of a parse error with let x = { foo: bar, };, this isn’t needed, it’s only needed for cases where this parses as a correct type ascription.

§current_let_binding: Option<(Span, Option<Span>, Option<Span>)>

Only used for better errors on let <pat>: <expr, not type>;.

§current_pat: Option<&'ast Pat>§in_if_condition: Option<&'ast Expr>

Used to detect possible if let written without let and to provide structured suggestion.

§in_assignment: Option<&'ast Expr>

Used to detect possible new binding written without let and to provide structured suggestion.

§is_assign_rhs: bool§in_non_gat_assoc_type: Option<bool>

If we are setting an associated type in trait impl, is it a non-GAT type?

§in_range: Option<(&'ast Expr, &'ast Expr)>

Used to detect possible . -> .. typo when calling methods.

§current_trait_object: Option<&'ast [GenericBound]>

If we are currently in a trait object definition. Used to point at the bounds when encountering a struct or enum.

§current_where_predicate: Option<&'ast WherePredicate>

Given where <T as Bar>::Baz: String, suggest where T: Bar<Baz = String>.

§current_type_path: Option<&'ast Ty>§current_impl_items: Option<&'ast [P<AssocItem>]>

The current impl items (used to suggest).

§currently_processing_impl_trait: Option<(TraitRef, Ty)>

When processing impl trait

§current_elision_failures: Vec<MissingLifetime>

Accumulate the errors due to missed lifetime elision, and report them all at once for each function.

Trait Implementations§

Source§

impl<'ast> Default for DiagMetadata<'ast>

Source§

fn default() -> DiagMetadata<'ast>

Returns the “default value” for a type. Read more

Auto Trait Implementations§

§

impl<'ast> DynSend for DiagMetadata<'ast>

§

impl<'ast> DynSync for DiagMetadata<'ast>

§

impl<'ast> Freeze for DiagMetadata<'ast>

§

impl<'ast> !RefUnwindSafe for DiagMetadata<'ast>

§

impl<'ast> !Send for DiagMetadata<'ast>

§

impl<'ast> !Sync for DiagMetadata<'ast>

§

impl<'ast> Unpin for DiagMetadata<'ast>

§

impl<'ast> !UnwindSafe for DiagMetadata<'ast>

Blanket Implementations§

Source§

impl<T> Aligned for T

Source§

const ALIGN: Alignment = _

Alignment of Self.
Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T, R> CollectAndApply<T, R> for T

Source§

fn collect_and_apply<I, F>(iter: I, f: F) -> R
where I: Iterator<Item = T>, F: FnOnce(&[T]) -> R,

Equivalent to f(&iter.collect::<Vec<_>>()).

Source§

type Output = R

Source§

impl<T> Filterable for T

Source§

fn filterable( self, filter_name: &'static str, ) -> RequestFilterDataProvider<T, fn(_: DataRequest<'_>) -> bool>

Creates a filterable data provider with the given name for debugging. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<P> IntoQueryParam<P> for P

Source§

impl<T> MaybeResult<T> for T

Source§

type Error = !

Source§

fn from(_: Result<T, <T as MaybeResult<T>>::Error>) -> T

Source§

fn to_result(self) -> Result<T, <T as MaybeResult<T>>::Error>

Source§

impl<T> Pointable for T

Source§

const ALIGN: usize = _

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<I, T, U> Upcast<I, U> for T
where U: UpcastFrom<I, T>,

Source§

fn upcast(self, interner: I) -> U

Source§

impl<I, T> UpcastFrom<I, T> for T

Source§

fn upcast_from(from: T, _tcx: I) -> T

Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<Tcx, T> Value<Tcx> for T
where Tcx: DepContext,

Source§

default fn from_cycle_error( tcx: Tcx, cycle_error: &CycleError, _guar: ErrorGuaranteed, ) -> T

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

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

Source§

impl<T> ErasedDestructor for T
where T: 'static,

Layout§

Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.

Size: 440 bytes