rustc_interface: Add a new query pre_configure
It partially expands crate attributes before the main expansion pass (without modifying the crate), and the produced preliminary crate attribute list is used for querying a few attributes that are required very early. Crate-level cfg attributes are then expanded normally during the main expansion pass, like attributes on any other nodes.
This commit is contained in:
parent
f26da39e04
commit
aca1b1e0b3
12 changed files with 108 additions and 84 deletions
|
@ -2116,7 +2116,7 @@ rustc_queries! {
|
|||
desc { "raw operations for metadata file access" }
|
||||
}
|
||||
|
||||
query crate_for_resolver((): ()) -> &'tcx Steal<rustc_ast::ast::Crate> {
|
||||
query crate_for_resolver((): ()) -> &'tcx Steal<(rustc_ast::Crate, rustc_ast::AttrVec)> {
|
||||
feedable
|
||||
no_hash
|
||||
desc { "the ast before macro expansion and name resolution" }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue