[−][src]Enum rustc_resolve::CrateLint

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.

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

impl CrateLint[src]

pub(crate) fn node_id(&self) -> Option<NodeId>[src]

Trait Implementations

impl Clone for CrateLint[src]

impl Copy for CrateLint[src]

impl Debug for CrateLint[src]

Auto Trait Implementations

impl RefUnwindSafe for CrateLint

impl !Send for CrateLint

impl !Sync for CrateLint

impl Unpin for CrateLint

impl UnwindSafe for CrateLint

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<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[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.