rustc_lint

Module 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 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).
  • 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).
  • Return a “error message-able” ident for the last segment of the Path
  • Return for a given Path the span until the last args
  • 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.