macro_rules! register_lints {
(@register $registry:ident, $config:ident, $pass:ident, early $(, $ctor:expr)?) => { ... };
(@register $registry:ident, $config:ident, $pass:ident, late $(, $ctor:expr)?) => { ... };
(@register $registry:ident, $config:ident, $pass:ident, project $(, $ctor:expr)?) => { ... };
(@call $registry:ident, $config:ident, $pass:ident, $method:ident, $ctor:expr) => { ... };
(@call $registry:ident, $config:ident, $pass:ident, $method:ident) => { ... };
( $( $module:ident: $( ($pass:ident, $kind:ident, ($($lint:ident),* $(,)?) $(, $ctor:expr)?) ),+ $(,)? ; )* ) => { ... };
}Expand description
Declares the lint modules of a severity group and registers their passes.
Each entry is module: (PassStruct, early|late|project, (LINT, ...) [, constructor]), ...;.
The macro glob-imports each module (which the caller declares with mod, so that rustfmt
still discovers the files), generates the PassStruct marker types,
the REGISTERED_LINTS slice and a register_lints function that adds every pass to Solar’s
registry. A constructor, when given, receives the lint-specific configuration.