Module non_local_def

Source

Structs§

NonLocalDefinitions 🔒
PathCollector 🔒
Simple hir::Path collector

Statics§

NON_LOCAL_DEFINITIONS
The non_local_definitions lint checks for impl blocks 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 Path the span until the last args
peel_parent_while 🔒
Given a DefId checks if it satisfies f if it does check with it’s parent and continue until it doesn’t satisfies f and return the last DefId checked.