Re-exportsΒ§
use rustc_attr_ir::find_attr;πuse rustc_errors::MultiSpan;πuse rustc_errors::msg;πuse rustc_hir::def::DefKind;πuse rustc_hir::def::Res;πuse rustc_hir::intravisit;πuse rustc_hir::intravisit::Visitor;πuse rustc_hir::Body;πuse rustc_hir::HirId;πuse rustc_hir::Item;πuse rustc_hir::ItemKind;πuse rustc_hir::Node;πuse rustc_hir::Path;πuse rustc_hir::TyKind;πuse rustc_lint_defs::declare_lint;πuse rustc_lint_defs::impl_lint_pass;πuse rustc_middle::ty::TyCtxt;πuse rustc_span::def_id::DefId;πuse rustc_span::def_id::LOCAL_CRATE;πuse rustc_span::ExpnKind;πuse rustc_span::Span;πuse rustc_span::kw;πuse crate::diagnostics::NonLocalDefinitionsCargoUpdateNote;πuse crate::diagnostics::NonLocalDefinitionsDiag;πuse crate::LateContext;πuse crate::LateLintPass;πuse crate::LintContext;π
StructsΒ§
- NonLocal
Definitions π - Path
Collector π - Simple hir::Path collector
StaticsΒ§
- NON_
LOCAL_ DEFINITIONS - The
non_local_definitionslint checks forimplblocks and#[macro_export]macro inside bodies (functions, enum discriminant, β¦).
FunctionsΒ§
- did_
has_ πlocal_ parent - Given a def id this checks if the parent def id (modulo modules) correspond to the def id of the parent impl definition (the direct one and the outermost one).
- path_
has_ πlocal_ parent - Given a path, this checks if the if the parent resolution def id corresponds to the def id of the parent impl definition (the direct one and the outermost one).
- path_
name_ πto_ string - Return a βerror message-ableβ ident for the last segment of the
Path - path_
span_ πwithout_ args - Return for a given
Paththe span until the last args - peel_
parent_ πwhile - Given a
DefIdchecks if it satisfiesfif it does check with itβs parent and continue until it doesnβt satisfiesfand return the lastDefIdchecked.