struct ExternCrateToLint {
    def_id: DefId,
    span: Span,
    orig_name: Option<Symbol>,
    warn_if_unused: bool,
}

Fields

def_id: DefId

DefId of the extern crate

span: Span

span from the item

orig_name: Option<Symbol>

if Some, then this is renamed (extern crate orig_name as crate_name), and – perhaps surprisingly – this stores the original name (item.name will contain the new name)

warn_if_unused: bool

if false, the original name started with _, so we shouldn’t lint about it going unused (but we should still emit idiom lints).

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

Returns the argument unchanged.

Calls U::from(self).

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

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