mirror of
https://github.com/rust-lang/rust.git
synced 2026-04-30 14:52:56 +03:00
Move ResolverOutputs out of rustc_middle.
It's not used in `rustc_middle`, and `rustc_resolve` is a better place for it.
This commit is contained in:
@@ -29,7 +29,7 @@
|
||||
new_parser_from_file, new_parser_from_source_str, unwrap_or_emit_fatal, validate_attr,
|
||||
};
|
||||
use rustc_passes::{abi_test, input_stats, layout_test};
|
||||
use rustc_resolve::Resolver;
|
||||
use rustc_resolve::{Resolver, ResolverOutputs};
|
||||
use rustc_session::config::{CrateType, Input, OutFileName, OutputFilenames, OutputType};
|
||||
use rustc_session::cstore::Untracked;
|
||||
use rustc_session::output::{collect_crate_types, filename_for_input};
|
||||
@@ -793,7 +793,7 @@ fn resolver_for_lowering_raw<'tcx>(
|
||||
// Make sure we don't mutate the cstore from here on.
|
||||
tcx.untracked().cstore.freeze();
|
||||
|
||||
let ty::ResolverOutputs {
|
||||
let ResolverOutputs {
|
||||
global_ctxt: untracked_resolutions,
|
||||
ast_lowering: untracked_resolver_for_lowering,
|
||||
} = resolver.into_outputs();
|
||||
|
||||
@@ -170,11 +170,6 @@
|
||||
|
||||
// Data types
|
||||
|
||||
pub struct ResolverOutputs {
|
||||
pub global_ctxt: ResolverGlobalCtxt,
|
||||
pub ast_lowering: ResolverAstLowering,
|
||||
}
|
||||
|
||||
#[derive(Debug, HashStable)]
|
||||
pub struct ResolverGlobalCtxt {
|
||||
pub visibilities_for_hashing: Vec<(LocalDefId, Visibility)>,
|
||||
|
||||
@@ -64,8 +64,8 @@
|
||||
use rustc_middle::query::Providers;
|
||||
use rustc_middle::span_bug;
|
||||
use rustc_middle::ty::{
|
||||
self, DelegationFnSig, Feed, MainDefinition, RegisteredTools, ResolverGlobalCtxt,
|
||||
ResolverOutputs, TyCtxt, TyCtxtFeed, Visibility,
|
||||
self, DelegationFnSig, Feed, MainDefinition, RegisteredTools, ResolverAstLowering,
|
||||
ResolverGlobalCtxt, TyCtxt, TyCtxtFeed, Visibility,
|
||||
};
|
||||
use rustc_query_system::ich::StableHashingContext;
|
||||
use rustc_session::lint::builtin::PRIVATE_MACRO_USE;
|
||||
@@ -1037,6 +1037,11 @@ fn new(ext: Arc<SyntaxExtension>) -> MacroData {
|
||||
}
|
||||
}
|
||||
|
||||
pub struct ResolverOutputs {
|
||||
pub global_ctxt: ResolverGlobalCtxt,
|
||||
pub ast_lowering: ResolverAstLowering,
|
||||
}
|
||||
|
||||
/// The main resolver class.
|
||||
///
|
||||
/// This is the visitor that walks the whole crate.
|
||||
|
||||
Reference in New Issue
Block a user