rustc_lint: Stop creating a fake ast::Crate for running early lints
Add a trait generalizing over the crate root and freshly loaded modules instead This also makes node IDs used for pre-expansion linting more precise
This commit is contained in:
@@ -1108,7 +1108,12 @@ impl InvocationCollectorNode for P<ast::Item> {
|
||||
);
|
||||
|
||||
if let Some(extern_mod_loaded) = ecx.extern_mod_loaded {
|
||||
(attrs, items) = extern_mod_loaded(ident, attrs, items, inner_span);
|
||||
(attrs, items) = extern_mod_loaded(
|
||||
ecx.current_expansion.lint_node_id,
|
||||
attrs,
|
||||
items,
|
||||
ident.name,
|
||||
);
|
||||
}
|
||||
|
||||
*mod_kind = ModKind::Loaded(items, Inline::No, inner_span);
|
||||
|
||||
Reference in New Issue
Block a user