1
Fork 0

Move the resolver into a query

This commit is contained in:
Oli Scherer 2023-02-16 14:07:42 +00:00
parent 37e2f4f487
commit c3522d0637
8 changed files with 54 additions and 31 deletions

View file

@ -33,7 +33,7 @@ rustc_queries! {
}
query resolver_for_lowering(_: ()) -> &'tcx Steal<(ty::ResolverAstLowering, Lrc<ast::Crate>)> {
feedable
eval_always
no_hash
desc { "getting the resolver for lowering" }
}
@ -2077,6 +2077,18 @@ rustc_queries! {
desc { "looking up enabled feature gates" }
}
query metadata_loader((): ()) -> &'tcx Steal<Box<rustc_session::cstore::MetadataLoaderDyn>> {
feedable
no_hash
desc { "raw operations for metadata file access" }
}
query crate_for_resolver((): ()) -> &'tcx Steal<rustc_ast::ast::Crate> {
feedable
no_hash
desc { "the ast before macro expansion and name resolution" }
}
/// Attempt to resolve the given `DefId` to an `Instance`, for the
/// given generics args (`SubstsRef`), returning one of:
/// * `Ok(Some(instance))` on success