Struct rustc_typeck::check_unused::ExternCrateToLint
source · 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
impl RefUnwindSafe for ExternCrateToLint
impl !Send for ExternCrateToLint
impl !Sync for ExternCrateToLint
impl Unpin for ExternCrateToLint
impl UnwindSafe for ExternCrateToLint
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<'a, T> Captures<'a> for Twhere
T: ?Sized,
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