[−][src]Struct rustc_lint::builtin::ClashingExternDeclarations

pub struct ClashingExternDeclarations {
    seen_decls: FxHashMap<Symbol, HirId>,
}

Fields

seen_decls: FxHashMap<Symbol, HirId>

Implementations

impl ClashingExternDeclarations[src]

pub(crate) fn new() -> Self[src]

pub(in builtin) fn insert(
    &mut self,
    tcx: TyCtxt<'_>,
    fi: &ForeignItem<'_>
) -> Option<HirId>
[src]

Insert a new foreign item into the seen set. If a symbol with the same name already exists for the item, return its HirId without updating the set.

pub(in builtin) fn name_of_extern_decl(
    tcx: TyCtxt<'_>,
    fi: &ForeignItem<'_>
) -> SymbolName
[src]

Get the name of the symbol that's linked against for a given extern declaration. That is, the name specified in a #[link_name = ...] attribute if one was specified, else, just the symbol's name.

pub(in builtin) fn structurally_same_type<'tcx>(
    cx: &LateContext<'tcx>,
    a: Ty<'tcx>,
    b: Ty<'tcx>,
    ckind: CItemKind
) -> bool
[src]

Checks whether two types are structurally the same enough that the declarations shouldn't clash. We need this so we don't emit a lint when two modules both declare an extern struct, with the same members (as the declarations shouldn't clash).

impl ClashingExternDeclarations[src]

pub fn get_lints() -> LintArray[src]

Trait Implementations

impl<'tcx> LateLintPass<'tcx> for ClashingExternDeclarations[src]

impl LintPass for ClashingExternDeclarations[src]

Auto Trait Implementations

impl RefUnwindSafe for ClashingExternDeclarations

impl Send for ClashingExternDeclarations

impl Sync for ClashingExternDeclarations

impl Unpin for ClashingExternDeclarations

impl UnwindSafe for ClashingExternDeclarations

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, 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.