Rollup merge of #82415 - petrochenkov:modin3, r=davidtwco
expand: Refactor module loading This is an accompanying PR to https://github.com/rust-lang/rust/pull/82399, but they can be landed independently. See individual commits for more details. Anyone should be able to review this equally well because all people actually familiar with this code left the project.
This commit is contained in:
commit
4a4e3e667d
15 changed files with 298 additions and 295 deletions
|
@ -302,8 +302,10 @@ fn configure_and_expand_inner<'a>(
|
|||
..rustc_expand::expand::ExpansionConfig::default(crate_name.to_string())
|
||||
};
|
||||
|
||||
let extern_mod_loaded = |k: &ast::Crate, ident: Ident| {
|
||||
pre_expansion_lint(sess, lint_store, k, &*ident.name.as_str())
|
||||
let extern_mod_loaded = |ident: Ident, attrs, items, span| {
|
||||
let krate = ast::Crate { attrs, items, span, proc_macros: vec![] };
|
||||
pre_expansion_lint(sess, lint_store, &krate, &ident.name.as_str());
|
||||
(krate.attrs, krate.items)
|
||||
};
|
||||
let mut ecx = ExtCtxt::new(&sess, cfg, &mut resolver, Some(&extern_mod_loaded));
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue