Module rustc_lint::non_local_def

source Β·

Structs§

Statics§

  • The non_local_definitions lint checks for impl blocks and #[macro_export] macro inside bodies (functions, enum discriminant, …).

Functions§

  • Given a def id and a parent impl def id, this checks if the parent def id (modulo modules) correspond to the def id of the parent impl definition.
  • Given a path and a parent impl def id, this checks if the if parent resolution def id correspond to the def id of the parent impl definition.
  • Return a β€œerror message-able” ident for the last segment of the Path
  • Return for a given Path the span until the last args
  • Compute the Span and visual representation for the Self we want to point at; It follows part of the actual logic of non-local, and if possible return the least amount possible for the span and representation.
  • Given a Ty we check if the (outermost) type is local.