mirror of
https://github.com/rust-lang/rust.git
synced 2026-04-27 18:57:42 +03:00
ty-aware delayed AST -> HIR lowering
This commit is contained in:
@@ -21,7 +21,7 @@
|
||||
use rustc_hir::def_id::{LOCAL_CRATE, StableCrateId, StableCrateIdMap};
|
||||
use rustc_hir::definitions::Definitions;
|
||||
use rustc_hir::limit::Limit;
|
||||
use rustc_hir::{Attribute, find_attr};
|
||||
use rustc_hir::{Attribute, MaybeOwner, find_attr};
|
||||
use rustc_incremental::setup_dep_graph;
|
||||
use rustc_lint::{BufferedEarlyLint, EarlyCheckNode, LintStore, unerased_lint_store};
|
||||
use rustc_metadata::EncodedMetadata;
|
||||
@@ -878,6 +878,10 @@ pub fn write_interface<'tcx>(tcx: TyCtxt<'tcx>) {
|
||||
let providers = &mut Providers::default();
|
||||
providers.queries.analysis = analysis;
|
||||
providers.queries.hir_crate = rustc_ast_lowering::lower_to_hir;
|
||||
providers.queries.lower_delayed_owner = rustc_ast_lowering::lower_delayed_owner;
|
||||
// `delayed_owner` is fed during `lower_delayed_owner`, by default it returns phantom,
|
||||
// as if this query was not fed it means that `MaybeOwner` does not exist for provided LocalDefId.
|
||||
providers.queries.delayed_owner = |_, _| MaybeOwner::Phantom;
|
||||
providers.queries.resolver_for_lowering_raw = resolver_for_lowering_raw;
|
||||
providers.queries.stripped_cfg_items = |tcx, _| &tcx.resolutions(()).stripped_cfg_items[..];
|
||||
providers.queries.resolutions = |tcx, ()| tcx.resolver_for_lowering_raw(()).1;
|
||||
|
||||
Reference in New Issue
Block a user