diff options
| author | Nicholas Nethercote <n.nethercote@gmail.com> | 2025-07-30 08:38:52 +1000 |
|---|---|---|
| committer | Nicholas Nethercote <n.nethercote@gmail.com> | 2025-07-31 11:50:23 +1000 |
| commit | e83c8cb26cd068cb23ca079d2992a08bed240385 (patch) | |
| tree | 9584bf0b895896945bae92b372d81772dbbacbb3 /compiler | |
| parent | 2bf10de494a4ee9cbd5176e00cca8830d778669a (diff) | |
| download | rust-e83c8cb26cd068cb23ca079d2992a08bed240385.tar.gz rust-e83c8cb26cd068cb23ca079d2992a08bed240385.zip | |
Move `ResolverOutputs` out of `rustc_middle`.
It's not used in `rustc_middle`, and `rustc_resolve` is a better place for it.
Diffstat (limited to 'compiler')
| -rw-r--r-- | compiler/rustc_interface/src/passes.rs | 4 | ||||
| -rw-r--r-- | compiler/rustc_middle/src/ty/mod.rs | 5 | ||||
| -rw-r--r-- | compiler/rustc_resolve/src/lib.rs | 9 |
3 files changed, 9 insertions, 9 deletions
diff --git a/compiler/rustc_interface/src/passes.rs b/compiler/rustc_interface/src/passes.rs index 057fbe2fc4e..83ac981429c 100644 --- a/compiler/rustc_interface/src/passes.rs +++ b/compiler/rustc_interface/src/passes.rs @@ -29,7 +29,7 @@ use rustc_parse::{ 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(); diff --git a/compiler/rustc_middle/src/ty/mod.rs b/compiler/rustc_middle/src/ty/mod.rs index bb70c61cd14..a0a6e3bab24 100644 --- a/compiler/rustc_middle/src/ty/mod.rs +++ b/compiler/rustc_middle/src/ty/mod.rs @@ -170,11 +170,6 @@ mod visit; // 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)>, diff --git a/compiler/rustc_resolve/src/lib.rs b/compiler/rustc_resolve/src/lib.rs index 88dfb50b47d..a70ae4fd57a 100644 --- a/compiler/rustc_resolve/src/lib.rs +++ b/compiler/rustc_resolve/src/lib.rs @@ -64,8 +64,8 @@ use rustc_middle::middle::privacy::EffectiveVisibilities; 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 @@ impl 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. |
