Enum rustc_resolve::CrateLint[][src]

pub(crate) enum CrateLint {
    No,
    SimplePath(NodeId),
    UsePath {
        root_id: NodeId,
        root_span: Span,
    },
    QPathTrait {
        qpath_id: NodeId,
        qpath_span: Span,
    },
}

Variants

No

Do not issue the lint.

SimplePath(NodeId)

This lint applies to some arbitrary path; e.g., impl ::foo::Bar. In this case, we can take the span of that path.

Tuple Fields of SimplePath

0: NodeId
UsePath

This lint comes from a use statement. In this case, what we care about really is the root use statement; e.g., if we have nested things like use a::{b, c}, we care about the use a part.

Fields of UsePath

root_id: NodeIdroot_span: Span
QPathTrait

This is the “trait item” from a fully qualified path. For example, we might be resolving X::Y::Z from a path like <T as X::Y>::Z. The path_span is the span of the to the trait itself (X::Y).

Fields of QPathTrait

qpath_id: NodeIdqpath_span: Span

Implementations

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

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: 16 bytes

Size for each variant: