From 7710f2dd5cdb812763b7c7e7a35f3184c647315e Mon Sep 17 00:00:00 2001 From: Mazdak Farrokhzad Date: Sun, 29 Mar 2020 15:24:45 +0200 Subject: [PATCH] rustc -> rustc_middle part 1 --- Cargo.lock | 106 +++++++++--------- src/libcore/clone.rs | 2 +- src/libcore/marker.rs | 2 +- src/librustc_ast/entry.rs | 2 +- src/librustc_ast/expand/mod.rs | 2 +- src/librustc_ast/lib.rs | 2 +- src/librustc_ast_lowering/lib.rs | 2 +- src/librustc_codegen_llvm/Cargo.toml | 2 +- src/librustc_codegen_ssa/Cargo.toml | 2 +- src/librustc_data_structures/lib.rs | 2 +- src/librustc_driver/Cargo.toml | 2 +- src/librustc_error_codes/error_codes/E0264.md | 2 +- src/librustc_errors/lib.rs | 2 +- src/librustc_hir/stable_hash_impls.rs | 2 +- src/librustc_incremental/Cargo.toml | 2 +- src/librustc_incremental/lib.rs | 2 +- src/librustc_infer/Cargo.toml | 2 +- src/librustc_infer/lib.rs | 2 +- src/librustc_interface/Cargo.toml | 2 +- src/librustc_interface/callbacks.rs | 8 +- src/librustc_lint/Cargo.toml | 2 +- src/librustc_lint/builtin.rs | 2 +- src/librustc_metadata/Cargo.toml | 2 +- src/librustc_metadata/lib.rs | 2 +- src/{librustc => librustc_middle}/Cargo.toml | 4 +- src/{librustc => librustc_middle}/README.md | 0 src/{librustc => librustc_middle}/arena.rs | 0 .../benches/lib.rs | 0 src/{librustc => librustc_middle}/build.rs | 0 .../dep_graph/dep_node.rs | 0 .../dep_graph/mod.rs | 0 .../hir/exports.rs | 0 .../hir/map/blocks.rs | 0 .../hir/map/collector.rs | 0 .../hir/map/mod.rs | 0 src/{librustc => librustc_middle}/hir/mod.rs | 0 src/{librustc => librustc_middle}/ich/hcx.rs | 0 .../ich/impls_hir.rs | 0 .../ich/impls_syntax.rs | 0 .../ich/impls_ty.rs | 0 src/{librustc => librustc_middle}/ich/mod.rs | 0 .../infer/canonical.rs | 0 .../infer/mod.rs | 0 .../infer/unify_key.rs | 0 src/{librustc => librustc_middle}/lib.rs | 2 + src/{librustc => librustc_middle}/lint.rs | 0 src/{librustc => librustc_middle}/macros.rs | 0 .../middle/codegen_fn_attrs.rs | 0 .../middle/cstore.rs | 0 .../middle/dependency_format.rs | 0 .../middle/exported_symbols.rs | 0 .../middle/free_region.rs | 0 .../middle/lang_items.rs | 0 .../middle/limits.rs | 0 .../middle/mod.rs | 0 .../middle/privacy.rs | 0 .../middle/region.rs | 0 .../middle/resolve_lifetime.rs | 0 .../middle/stability.rs | 0 .../mir/cache.rs | 0 .../mir/interpret/allocation.rs | 0 .../mir/interpret/error.rs | 0 .../mir/interpret/mod.rs | 0 .../mir/interpret/pointer.rs | 0 .../mir/interpret/queries.rs | 0 .../mir/interpret/value.rs | 0 src/{librustc => librustc_middle}/mir/mod.rs | 0 src/{librustc => librustc_middle}/mir/mono.rs | 0 .../mir/query.rs | 0 src/{librustc => librustc_middle}/mir/tcx.rs | 0 .../mir/traversal.rs | 0 .../mir/type_foldable.rs | 0 .../mir/visit.rs | 0 .../query/mod.rs | 0 src/{librustc => librustc_middle}/tests.rs | 2 +- .../traits/mod.rs | 0 .../traits/query.rs | 0 .../traits/select.rs | 0 .../traits/specialization_graph.rs | 0 .../traits/structural_impls.rs | 0 .../ty/_match.rs | 0 .../ty/adjustment.rs | 0 .../ty/binding.rs | 0 src/{librustc => librustc_middle}/ty/cast.rs | 0 src/{librustc => librustc_middle}/ty/codec.rs | 0 .../ty/context.rs | 0 .../ty/diagnostics.rs | 0 .../ty/erase_regions.rs | 0 src/{librustc => librustc_middle}/ty/error.rs | 0 .../ty/fast_reject.rs | 0 src/{librustc => librustc_middle}/ty/flags.rs | 0 src/{librustc => librustc_middle}/ty/fold.rs | 0 .../ty/free_region_map.rs | 0 .../ty/inhabitedness/def_id_forest.rs | 0 .../ty/inhabitedness/mod.rs | 0 .../ty/instance.rs | 0 .../ty/layout.rs | 0 src/{librustc => librustc_middle}/ty/mod.rs | 0 .../ty/normalize_erasing_regions.rs | 0 .../ty/outlives.rs | 0 .../ty/print/mod.rs | 0 .../ty/print/obsolete.rs | 0 .../ty/print/pretty.rs | 0 .../ty/query/README.md | 0 .../ty/query/job.rs | 0 .../ty/query/keys.rs | 0 .../ty/query/mod.rs | 0 .../ty/query/on_disk_cache.rs | 0 .../ty/query/plumbing.rs | 0 .../ty/query/profiling_support.rs | 0 .../ty/query/stats.rs | 0 .../ty/query/values.rs | 0 .../ty/relate.rs | 0 src/{librustc => librustc_middle}/ty/steal.rs | 0 .../ty/structural_impls.rs | 0 src/{librustc => librustc_middle}/ty/sty.rs | 0 src/{librustc => librustc_middle}/ty/subst.rs | 0 .../ty/trait_def.rs | 0 src/{librustc => librustc_middle}/ty/util.rs | 0 src/{librustc => librustc_middle}/ty/walk.rs | 0 src/{librustc => librustc_middle}/util/bug.rs | 0 .../util/common.rs | 0 .../util/common/tests.rs | 0 src/librustc_mir/Cargo.toml | 2 +- src/librustc_mir/const_eval/error.rs | 2 +- src/librustc_mir/interpret/intrinsics.rs | 2 +- src/librustc_mir_build/Cargo.toml | 2 +- src/librustc_passes/Cargo.toml | 2 +- src/librustc_passes/stability.rs | 2 +- src/librustc_plugin_impl/Cargo.toml | 2 +- src/librustc_privacy/Cargo.toml | 2 +- .../dep_graph/dep_node.rs | 2 +- src/librustc_query_system/query/config.rs | 4 +- src/librustc_resolve/Cargo.toml | 2 +- src/librustc_save_analysis/Cargo.toml | 2 +- src/librustc_session/filesearch.rs | 2 +- src/librustc_session/lint.rs | 2 +- src/librustc_span/lib.rs | 2 +- src/librustc_symbol_mangling/Cargo.toml | 2 +- src/librustc_target/lib.rs | 2 +- src/librustc_trait_selection/Cargo.toml | 2 +- src/librustc_traits/Cargo.toml | 2 +- src/librustc_ty/Cargo.toml | 2 +- src/librustc_typeck/Cargo.toml | 2 +- .../check/generator_interior.rs | 2 +- src/librustdoc/core.rs | 2 +- src/libstd/alloc.rs | 2 +- 147 files changed, 109 insertions(+), 107 deletions(-) rename src/{librustc => librustc_middle}/Cargo.toml (96%) rename src/{librustc => librustc_middle}/README.md (100%) rename src/{librustc => librustc_middle}/arena.rs (100%) rename src/{librustc => librustc_middle}/benches/lib.rs (100%) rename src/{librustc => librustc_middle}/build.rs (100%) rename src/{librustc => librustc_middle}/dep_graph/dep_node.rs (100%) rename src/{librustc => librustc_middle}/dep_graph/mod.rs (100%) rename src/{librustc => librustc_middle}/hir/exports.rs (100%) rename src/{librustc => librustc_middle}/hir/map/blocks.rs (100%) rename src/{librustc => librustc_middle}/hir/map/collector.rs (100%) rename src/{librustc => librustc_middle}/hir/map/mod.rs (100%) rename src/{librustc => librustc_middle}/hir/mod.rs (100%) rename src/{librustc => librustc_middle}/ich/hcx.rs (100%) rename src/{librustc => librustc_middle}/ich/impls_hir.rs (100%) rename src/{librustc => librustc_middle}/ich/impls_syntax.rs (100%) rename src/{librustc => librustc_middle}/ich/impls_ty.rs (100%) rename src/{librustc => librustc_middle}/ich/mod.rs (100%) rename src/{librustc => librustc_middle}/infer/canonical.rs (100%) rename src/{librustc => librustc_middle}/infer/mod.rs (100%) rename src/{librustc => librustc_middle}/infer/unify_key.rs (100%) rename src/{librustc => librustc_middle}/lib.rs (95%) rename src/{librustc => librustc_middle}/lint.rs (100%) rename src/{librustc => librustc_middle}/macros.rs (100%) rename src/{librustc => librustc_middle}/middle/codegen_fn_attrs.rs (100%) rename src/{librustc => librustc_middle}/middle/cstore.rs (100%) rename src/{librustc => librustc_middle}/middle/dependency_format.rs (100%) rename src/{librustc => librustc_middle}/middle/exported_symbols.rs (100%) rename src/{librustc => librustc_middle}/middle/free_region.rs (100%) rename src/{librustc => librustc_middle}/middle/lang_items.rs (100%) rename src/{librustc => librustc_middle}/middle/limits.rs (100%) rename src/{librustc => librustc_middle}/middle/mod.rs (100%) rename src/{librustc => librustc_middle}/middle/privacy.rs (100%) rename src/{librustc => librustc_middle}/middle/region.rs (100%) rename src/{librustc => librustc_middle}/middle/resolve_lifetime.rs (100%) rename src/{librustc => librustc_middle}/middle/stability.rs (100%) rename src/{librustc => librustc_middle}/mir/cache.rs (100%) rename src/{librustc => librustc_middle}/mir/interpret/allocation.rs (100%) rename src/{librustc => librustc_middle}/mir/interpret/error.rs (100%) rename src/{librustc => librustc_middle}/mir/interpret/mod.rs (100%) rename src/{librustc => librustc_middle}/mir/interpret/pointer.rs (100%) rename src/{librustc => librustc_middle}/mir/interpret/queries.rs (100%) rename src/{librustc => librustc_middle}/mir/interpret/value.rs (100%) rename src/{librustc => librustc_middle}/mir/mod.rs (100%) rename src/{librustc => librustc_middle}/mir/mono.rs (100%) rename src/{librustc => librustc_middle}/mir/query.rs (100%) rename src/{librustc => librustc_middle}/mir/tcx.rs (100%) rename src/{librustc => librustc_middle}/mir/traversal.rs (100%) rename src/{librustc => librustc_middle}/mir/type_foldable.rs (100%) rename src/{librustc => librustc_middle}/mir/visit.rs (100%) rename src/{librustc => librustc_middle}/query/mod.rs (100%) rename src/{librustc => librustc_middle}/tests.rs (84%) rename src/{librustc => librustc_middle}/traits/mod.rs (100%) rename src/{librustc => librustc_middle}/traits/query.rs (100%) rename src/{librustc => librustc_middle}/traits/select.rs (100%) rename src/{librustc => librustc_middle}/traits/specialization_graph.rs (100%) rename src/{librustc => librustc_middle}/traits/structural_impls.rs (100%) rename src/{librustc => librustc_middle}/ty/_match.rs (100%) rename src/{librustc => librustc_middle}/ty/adjustment.rs (100%) rename src/{librustc => librustc_middle}/ty/binding.rs (100%) rename src/{librustc => librustc_middle}/ty/cast.rs (100%) rename src/{librustc => librustc_middle}/ty/codec.rs (100%) rename src/{librustc => librustc_middle}/ty/context.rs (100%) rename src/{librustc => librustc_middle}/ty/diagnostics.rs (100%) rename src/{librustc => librustc_middle}/ty/erase_regions.rs (100%) rename src/{librustc => librustc_middle}/ty/error.rs (100%) rename src/{librustc => librustc_middle}/ty/fast_reject.rs (100%) rename src/{librustc => librustc_middle}/ty/flags.rs (100%) rename src/{librustc => librustc_middle}/ty/fold.rs (100%) rename src/{librustc => librustc_middle}/ty/free_region_map.rs (100%) rename src/{librustc => librustc_middle}/ty/inhabitedness/def_id_forest.rs (100%) rename src/{librustc => librustc_middle}/ty/inhabitedness/mod.rs (100%) rename src/{librustc => librustc_middle}/ty/instance.rs (100%) rename src/{librustc => librustc_middle}/ty/layout.rs (100%) rename src/{librustc => librustc_middle}/ty/mod.rs (100%) rename src/{librustc => librustc_middle}/ty/normalize_erasing_regions.rs (100%) rename src/{librustc => librustc_middle}/ty/outlives.rs (100%) rename src/{librustc => librustc_middle}/ty/print/mod.rs (100%) rename src/{librustc => librustc_middle}/ty/print/obsolete.rs (100%) rename src/{librustc => librustc_middle}/ty/print/pretty.rs (100%) rename src/{librustc => librustc_middle}/ty/query/README.md (100%) rename src/{librustc => librustc_middle}/ty/query/job.rs (100%) rename src/{librustc => librustc_middle}/ty/query/keys.rs (100%) rename src/{librustc => librustc_middle}/ty/query/mod.rs (100%) rename src/{librustc => librustc_middle}/ty/query/on_disk_cache.rs (100%) rename src/{librustc => librustc_middle}/ty/query/plumbing.rs (100%) rename src/{librustc => librustc_middle}/ty/query/profiling_support.rs (100%) rename src/{librustc => librustc_middle}/ty/query/stats.rs (100%) rename src/{librustc => librustc_middle}/ty/query/values.rs (100%) rename src/{librustc => librustc_middle}/ty/relate.rs (100%) rename src/{librustc => librustc_middle}/ty/steal.rs (100%) rename src/{librustc => librustc_middle}/ty/structural_impls.rs (100%) rename src/{librustc => librustc_middle}/ty/sty.rs (100%) rename src/{librustc => librustc_middle}/ty/subst.rs (100%) rename src/{librustc => librustc_middle}/ty/trait_def.rs (100%) rename src/{librustc => librustc_middle}/ty/util.rs (100%) rename src/{librustc => librustc_middle}/ty/walk.rs (100%) rename src/{librustc => librustc_middle}/util/bug.rs (100%) rename src/{librustc => librustc_middle}/util/common.rs (100%) rename src/{librustc => librustc_middle}/util/common/tests.rs (100%) diff --git a/Cargo.lock b/Cargo.lock index fdc84e53d12..e8b21a247b2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3132,39 +3132,6 @@ dependencies = [ "rustc-workspace-hack", ] -[[package]] -name = "rustc" -version = "0.0.0" -dependencies = [ - "arena", - "backtrace", - "bitflags", - "byteorder", - "jobserver", - "log", - "measureme", - "parking_lot 0.10.0", - "polonius-engine", - "rustc-rayon", - "rustc-rayon-core", - "rustc_apfloat", - "rustc_ast", - "rustc_attr", - "rustc_data_structures", - "rustc_errors", - "rustc_feature", - "rustc_hir", - "rustc_index", - "rustc_macros", - "rustc_query_system", - "rustc_session", - "rustc_span", - "rustc_target", - "scoped-tls", - "serialize", - "smallvec 1.0.0", -] - [[package]] name = "rustc-ap-arena" version = "642.0.0" @@ -3603,7 +3570,6 @@ dependencies = [ "libc", "log", "measureme", - "rustc", "rustc-demangle", "rustc_ast", "rustc_attr", @@ -3616,6 +3582,7 @@ dependencies = [ "rustc_incremental", "rustc_index", "rustc_llvm", + "rustc_middle", "rustc_session", "rustc_span", "rustc_target", @@ -3634,7 +3601,6 @@ dependencies = [ "log", "memmap", "num_cpus", - "rustc", "rustc_apfloat", "rustc_ast", "rustc_attr", @@ -3645,6 +3611,7 @@ dependencies = [ "rustc_incremental", "rustc_index", "rustc_metadata", + "rustc_middle", "rustc_session", "rustc_span", "rustc_symbol_mangling", @@ -3685,7 +3652,6 @@ dependencies = [ "env_logger 0.7.1", "lazy_static 1.4.0", "log", - "rustc", "rustc_ast", "rustc_ast_pretty", "rustc_codegen_ssa", @@ -3698,6 +3664,7 @@ dependencies = [ "rustc_interface", "rustc_lint", "rustc_metadata", + "rustc_middle", "rustc_mir", "rustc_parse", "rustc_plugin_impl", @@ -3797,11 +3764,11 @@ dependencies = [ "graphviz", "log", "rand 0.7.3", - "rustc", "rustc_ast", "rustc_data_structures", "rustc_fs_util", "rustc_hir", + "rustc_middle", "rustc_session", "rustc_span", "serialize", @@ -3821,13 +3788,13 @@ version = "0.0.0" dependencies = [ "graphviz", "log", - "rustc", "rustc_ast", "rustc_data_structures", "rustc_errors", "rustc_hir", "rustc_index", "rustc_macros", + "rustc_middle", "rustc_session", "rustc_span", "rustc_target", @@ -3840,7 +3807,6 @@ version = "0.0.0" dependencies = [ "log", "once_cell", - "rustc", "rustc-rayon", "rustc_ast", "rustc_ast_lowering", @@ -3857,6 +3823,7 @@ dependencies = [ "rustc_infer", "rustc_lint", "rustc_metadata", + "rustc_middle", "rustc_mir", "rustc_mir_build", "rustc_parse", @@ -3890,7 +3857,6 @@ name = "rustc_lint" version = "0.0.0" dependencies = [ "log", - "rustc", "rustc_ast", "rustc_ast_pretty", "rustc_attr", @@ -3900,6 +3866,7 @@ dependencies = [ "rustc_hir", "rustc_index", "rustc_infer", + "rustc_middle", "rustc_session", "rustc_span", "rustc_target", @@ -3933,7 +3900,6 @@ dependencies = [ "flate2", "log", "memmap", - "rustc", "rustc_ast", "rustc_attr", "rustc_data_structures", @@ -3942,6 +3908,7 @@ dependencies = [ "rustc_hir", "rustc_hir_pretty", "rustc_index", + "rustc_middle", "rustc_session", "rustc_span", "rustc_target", @@ -3951,6 +3918,39 @@ dependencies = [ "winapi 0.3.8", ] +[[package]] +name = "rustc_middle" +version = "0.0.0" +dependencies = [ + "arena", + "backtrace", + "bitflags", + "byteorder", + "jobserver", + "log", + "measureme", + "parking_lot 0.10.0", + "polonius-engine", + "rustc-rayon", + "rustc-rayon-core", + "rustc_apfloat", + "rustc_ast", + "rustc_attr", + "rustc_data_structures", + "rustc_errors", + "rustc_feature", + "rustc_hir", + "rustc_index", + "rustc_macros", + "rustc_query_system", + "rustc_session", + "rustc_span", + "rustc_target", + "scoped-tls", + "serialize", + "smallvec 1.0.0", +] + [[package]] name = "rustc_mir" version = "0.0.0" @@ -3961,7 +3961,6 @@ dependencies = [ "log", "log_settings", "polonius-engine", - "rustc", "rustc_apfloat", "rustc_ast", "rustc_ast_pretty", @@ -3973,6 +3972,7 @@ dependencies = [ "rustc_infer", "rustc_lexer", "rustc_macros", + "rustc_middle", "rustc_session", "rustc_span", "rustc_target", @@ -3987,7 +3987,6 @@ version = "0.0.0" dependencies = [ "arena", "log", - "rustc", "rustc_apfloat", "rustc_ast", "rustc_attr", @@ -3997,6 +3996,7 @@ dependencies = [ "rustc_index", "rustc_infer", "rustc_macros", + "rustc_middle", "rustc_session", "rustc_span", "rustc_target", @@ -4028,7 +4028,6 @@ name = "rustc_passes" version = "0.0.0" dependencies = [ "log", - "rustc", "rustc_ast", "rustc_attr", "rustc_data_structures", @@ -4037,6 +4036,7 @@ dependencies = [ "rustc_hir", "rustc_index", "rustc_infer", + "rustc_middle", "rustc_session", "rustc_span", "rustc_target", @@ -4047,12 +4047,12 @@ dependencies = [ name = "rustc_plugin_impl" version = "0.0.0" dependencies = [ - "rustc", "rustc_ast", "rustc_errors", "rustc_hir", "rustc_lint", "rustc_metadata", + "rustc_middle", "rustc_session", "rustc_span", ] @@ -4062,12 +4062,12 @@ name = "rustc_privacy" version = "0.0.0" dependencies = [ "log", - "rustc", "rustc_ast", "rustc_attr", "rustc_data_structures", "rustc_errors", "rustc_hir", + "rustc_middle", "rustc_session", "rustc_span", "rustc_typeck", @@ -4096,7 +4096,6 @@ dependencies = [ "arena", "bitflags", "log", - "rustc", "rustc_ast", "rustc_ast_lowering", "rustc_ast_pretty", @@ -4107,6 +4106,7 @@ dependencies = [ "rustc_feature", "rustc_hir", "rustc_metadata", + "rustc_middle", "rustc_session", "rustc_span", "smallvec 1.0.0", @@ -4119,12 +4119,12 @@ dependencies = [ "log", "rls-data", "rls-span", - "rustc", "rustc_ast", "rustc_ast_pretty", "rustc_data_structures", "rustc_hir", "rustc_hir_pretty", + "rustc_middle", "rustc_parse", "rustc_session", "rustc_span", @@ -4169,12 +4169,12 @@ version = "0.0.0" dependencies = [ "log", "punycode", - "rustc", "rustc-demangle", "rustc_ast", "rustc_data_structures", "rustc_hir", "rustc_metadata", + "rustc_middle", "rustc_session", "rustc_span", "rustc_target", @@ -4209,7 +4209,6 @@ version = "0.0.0" dependencies = [ "fmt_macros", "log", - "rustc", "rustc_ast", "rustc_attr", "rustc_data_structures", @@ -4218,6 +4217,7 @@ dependencies = [ "rustc_index", "rustc_infer", "rustc_macros", + "rustc_middle", "rustc_session", "rustc_span", "rustc_target", @@ -4229,12 +4229,12 @@ name = "rustc_traits" version = "0.0.0" dependencies = [ "log", - "rustc", "rustc_ast", "rustc_data_structures", "rustc_hir", "rustc_infer", "rustc_macros", + "rustc_middle", "rustc_span", "rustc_target", "rustc_trait_selection", @@ -4246,10 +4246,10 @@ name = "rustc_ty" version = "0.0.0" dependencies = [ "log", - "rustc", "rustc_data_structures", "rustc_hir", "rustc_infer", + "rustc_middle", "rustc_session", "rustc_span", "rustc_target", @@ -4262,7 +4262,6 @@ version = "0.0.0" dependencies = [ "arena", "log", - "rustc", "rustc_ast", "rustc_attr", "rustc_data_structures", @@ -4270,6 +4269,7 @@ dependencies = [ "rustc_hir", "rustc_index", "rustc_infer", + "rustc_middle", "rustc_session", "rustc_span", "rustc_target", diff --git a/src/libcore/clone.rs b/src/libcore/clone.rs index eb101fc72fd..9cc0109069e 100644 --- a/src/libcore/clone.rs +++ b/src/libcore/clone.rs @@ -169,7 +169,7 @@ pub struct AssertParamIsCopy { /// Implementations of `Clone` for primitive types. /// /// Implementations that cannot be described in Rust -/// are implemented in `SelectionContext::copy_clone_conditions()` in librustc. +/// are implemented in `SelectionContext::copy_clone_conditions()` in librustc_middle. mod impls { use super::Clone; diff --git a/src/libcore/marker.rs b/src/libcore/marker.rs index b131cf84e18..9b13766e9c4 100644 --- a/src/libcore/marker.rs +++ b/src/libcore/marker.rs @@ -759,7 +759,7 @@ impl Unpin for *mut T {} /// Implementations of `Copy` for primitive types. /// /// Implementations that cannot be described in Rust -/// are implemented in `SelectionContext::copy_clone_conditions()` in librustc. +/// are implemented in `SelectionContext::copy_clone_conditions()` in librustc_middle. mod copy_impls { use super::Copy; diff --git a/src/librustc_ast/entry.rs b/src/librustc_ast/entry.rs index 0a72019bfe9..90d417a45fd 100644 --- a/src/librustc_ast/entry.rs +++ b/src/librustc_ast/entry.rs @@ -10,7 +10,7 @@ pub enum EntryPointType { OtherMain, // Not an entry point, but some other function named main } -// Beware, this is duplicated in librustc/middle/entry.rs, make sure to keep +// Beware, this is duplicated in librustc_middle/middle/entry.rs, make sure to keep // them in sync. pub fn entry_point_type(item: &Item, depth: usize) -> EntryPointType { match item.kind { diff --git a/src/librustc_ast/expand/mod.rs b/src/librustc_ast/expand/mod.rs index 50df8fa39ed..3c634ff40cc 100644 --- a/src/librustc_ast/expand/mod.rs +++ b/src/librustc_ast/expand/mod.rs @@ -1,4 +1,4 @@ -//! Definitions shared by macros / syntax extensions and e.g. librustc. +//! Definitions shared by macros / syntax extensions and e.g. librustc_middle. use crate::ast::Attribute; use rustc_span::symbol::sym; diff --git a/src/librustc_ast/lib.rs b/src/librustc_ast/lib.rs index a93e0fcbd71..1687f828f24 100644 --- a/src/librustc_ast/lib.rs +++ b/src/librustc_ast/lib.rs @@ -54,7 +54,7 @@ use rustc_data_structures::stable_hasher::{HashStable, StableHasher}; /// Requirements for a `StableHashingContext` to be used in this crate. /// This is a hack to allow using the `HashStable_Generic` derive macro -/// instead of implementing everything in librustc. +/// instead of implementing everything in librustc_middle. pub trait HashStableContext: rustc_span::HashStableContext { fn hash_attr(&mut self, _: &ast::Attribute, hasher: &mut StableHasher); } diff --git a/src/librustc_ast_lowering/lib.rs b/src/librustc_ast_lowering/lib.rs index 45ee7265c15..9028edc73a0 100644 --- a/src/librustc_ast_lowering/lib.rs +++ b/src/librustc_ast_lowering/lib.rs @@ -97,7 +97,7 @@ struct LoweringContext<'a, 'hir: 'a> { /// HACK(Centril): there is a cyclic dependency between the parser and lowering /// if we don't have this function pointer. To avoid that dependency so that - /// librustc is independent of the parser, we use dynamic dispatch here. + /// librustc_middle is independent of the parser, we use dynamic dispatch here. nt_to_tokenstream: NtToTokenstream, /// Used to allocate HIR nodes diff --git a/src/librustc_codegen_llvm/Cargo.toml b/src/librustc_codegen_llvm/Cargo.toml index 16ed0854abe..64e66595d92 100644 --- a/src/librustc_codegen_llvm/Cargo.toml +++ b/src/librustc_codegen_llvm/Cargo.toml @@ -16,7 +16,7 @@ flate2 = "1.0" libc = "0.2" measureme = "0.7.1" log = "0.4" -rustc = { path = "../librustc" } +rustc_middle = { path = "../librustc_middle" } rustc-demangle = "0.1" rustc_attr = { path = "../librustc_attr" } rustc_codegen_ssa = { path = "../librustc_codegen_ssa" } diff --git a/src/librustc_codegen_ssa/Cargo.toml b/src/librustc_codegen_ssa/Cargo.toml index 299f4d2c669..717e32d4a0d 100644 --- a/src/librustc_codegen_ssa/Cargo.toml +++ b/src/librustc_codegen_ssa/Cargo.toml @@ -22,7 +22,7 @@ tempfile = "3.1" rustc_serialize = { path = "../libserialize", package = "serialize" } rustc_ast = { path = "../librustc_ast" } rustc_span = { path = "../librustc_span" } -rustc = { path = "../librustc" } +rustc_middle = { path = "../librustc_middle" } rustc_apfloat = { path = "../librustc_apfloat" } rustc_attr = { path = "../librustc_attr" } rustc_symbol_mangling = { path = "../librustc_symbol_mangling" } diff --git a/src/librustc_data_structures/lib.rs b/src/librustc_data_structures/lib.rs index f9f8ff5303e..ba82e58d7a9 100644 --- a/src/librustc_data_structures/lib.rs +++ b/src/librustc_data_structures/lib.rs @@ -114,6 +114,6 @@ impl Drop for OnDrop { } } -// See comments in src/librustc/lib.rs +// See comments in src/librustc_middle/lib.rs #[doc(hidden)] pub fn __noop_fix_for_27438() {} diff --git a/src/librustc_driver/Cargo.toml b/src/librustc_driver/Cargo.toml index 3ca39b24c52..652f16c2e08 100644 --- a/src/librustc_driver/Cargo.toml +++ b/src/librustc_driver/Cargo.toml @@ -13,7 +13,7 @@ crate-type = ["dylib"] lazy_static = "1.0" log = "0.4" env_logger = { version = "0.7", default-features = false } -rustc = { path = "../librustc" } +rustc_middle = { path = "../librustc_middle" } rustc_ast_pretty = { path = "../librustc_ast_pretty" } rustc_target = { path = "../librustc_target" } rustc_lint = { path = "../librustc_lint" } diff --git a/src/librustc_error_codes/error_codes/E0264.md b/src/librustc_error_codes/error_codes/E0264.md index 708eac8837a..e2a27f7b106 100644 --- a/src/librustc_error_codes/error_codes/E0264.md +++ b/src/librustc_error_codes/error_codes/E0264.md @@ -12,7 +12,7 @@ extern "C" { ``` A list of available external lang items is available in -`src/librustc/middle/weak_lang_items.rs`. Example: +`src/librustc_middle/middle/weak_lang_items.rs`. Example: ``` #![feature(lang_items)] diff --git a/src/librustc_errors/lib.rs b/src/librustc_errors/lib.rs index 6157c46f80c..204fea58c95 100644 --- a/src/librustc_errors/lib.rs +++ b/src/librustc_errors/lib.rs @@ -425,7 +425,7 @@ impl Handler { } // This is here to not allow mutation of flags; - // as of this writing it's only used in tests in librustc. + // as of this writing it's only used in tests in librustc_middle. pub fn can_emit_warnings(&self) -> bool { self.flags.can_emit_warnings } diff --git a/src/librustc_hir/stable_hash_impls.rs b/src/librustc_hir/stable_hash_impls.rs index 996b3108969..1d3f44a0899 100644 --- a/src/librustc_hir/stable_hash_impls.rs +++ b/src/librustc_hir/stable_hash_impls.rs @@ -9,7 +9,7 @@ use rustc_span::def_id::{DefPathHash, LocalDefId}; /// Requirements for a `StableHashingContext` to be used in this crate. /// This is a hack to allow using the `HashStable_Generic` derive macro -/// instead of implementing everything in librustc. +/// instead of implementing everything in librustc_middle. pub trait HashStableContext: rustc_ast::HashStableContext + rustc_target::HashStableContext { diff --git a/src/librustc_incremental/Cargo.toml b/src/librustc_incremental/Cargo.toml index eddfb81ea8b..5caf1d411e6 100644 --- a/src/librustc_incremental/Cargo.toml +++ b/src/librustc_incremental/Cargo.toml @@ -13,7 +13,7 @@ doctest = false graphviz = { path = "../libgraphviz" } log = "0.4" rand = "0.7" -rustc = { path = "../librustc" } +rustc_middle = { path = "../librustc_middle" } rustc_data_structures = { path = "../librustc_data_structures" } rustc_hir = { path = "../librustc_hir" } rustc_serialize = { path = "../libserialize", package = "serialize" } diff --git a/src/librustc_incremental/lib.rs b/src/librustc_incremental/lib.rs index ca824fde7ef..dd715c6c81d 100644 --- a/src/librustc_incremental/lib.rs +++ b/src/librustc_incremental/lib.rs @@ -6,7 +6,7 @@ #![recursion_limit = "256"] #[macro_use] -extern crate rustc; +extern crate rustc_middle; #[macro_use] extern crate log; diff --git a/src/librustc_infer/Cargo.toml b/src/librustc_infer/Cargo.toml index 9ecd056430c..bc4080ac6c8 100644 --- a/src/librustc_infer/Cargo.toml +++ b/src/librustc_infer/Cargo.toml @@ -12,7 +12,7 @@ doctest = false [dependencies] graphviz = { path = "../libgraphviz" } log = { version = "0.4", features = ["release_max_level_info", "std"] } -rustc = { path = "../librustc" } +rustc_middle = { path = "../librustc_middle" } rustc_data_structures = { path = "../librustc_data_structures" } rustc_errors = { path = "../librustc_errors" } rustc_hir = { path = "../librustc_hir" } diff --git a/src/librustc_infer/lib.rs b/src/librustc_infer/lib.rs index cb8ae8c592b..5dd5165b688 100644 --- a/src/librustc_infer/lib.rs +++ b/src/librustc_infer/lib.rs @@ -30,7 +30,7 @@ extern crate rustc_data_structures; #[macro_use] extern crate log; #[macro_use] -extern crate rustc; +extern crate rustc_middle; pub mod infer; pub mod traits; diff --git a/src/librustc_interface/Cargo.toml b/src/librustc_interface/Cargo.toml index 2e055ff183f..c9d81e51641 100644 --- a/src/librustc_interface/Cargo.toml +++ b/src/librustc_interface/Cargo.toml @@ -21,7 +21,7 @@ rustc_parse = { path = "../librustc_parse" } rustc_session = { path = "../librustc_session" } rustc_span = { path = "../librustc_span" } rustc_serialize = { path = "../libserialize", package = "serialize" } -rustc = { path = "../librustc" } +rustc_middle = { path = "../librustc_middle" } rustc_ast_lowering = { path = "../librustc_ast_lowering" } rustc_ast_passes = { path = "../librustc_ast_passes" } rustc_incremental = { path = "../librustc_incremental" } diff --git a/src/librustc_interface/callbacks.rs b/src/librustc_interface/callbacks.rs index 0345b82d3bb..6fb56b785af 100644 --- a/src/librustc_interface/callbacks.rs +++ b/src/librustc_interface/callbacks.rs @@ -1,6 +1,6 @@ //! Throughout the compiler tree, there are several places which want to have //! access to state or queries while being inside crates that are dependencies -//! of librustc. To facilitate this, we have the +//! of librustc_middle. To facilitate this, we have the //! `rustc_data_structures::AtomicRef` type, which allows us to setup a global //! static which can then be set in this file at program startup. //! @@ -14,7 +14,7 @@ use rustc_errors::{Diagnostic, TRACK_DIAGNOSTICS}; use std::fmt; /// This is a callback from librustc_ast as it cannot access the implicit state -/// in librustc otherwise. +/// in librustc_middle otherwise. fn span_debug(span: rustc_span::Span, f: &mut fmt::Formatter<'_>) -> fmt::Result { tls::with_opt(|tcx| { if let Some(tcx) = tcx { @@ -26,7 +26,7 @@ fn span_debug(span: rustc_span::Span, f: &mut fmt::Formatter<'_>) -> fmt::Result } /// This is a callback from librustc_ast as it cannot access the implicit state -/// in librustc otherwise. It is used to when diagnostic messages are +/// in librustc_middle otherwise. It is used to when diagnostic messages are /// emitted and stores them in the current query, if there is one. fn track_diagnostic(diagnostic: &Diagnostic) { tls::with_context_opt(|icx| { @@ -40,7 +40,7 @@ fn track_diagnostic(diagnostic: &Diagnostic) { } /// This is a callback from librustc_hir as it cannot access the implicit state -/// in librustc otherwise. +/// in librustc_middle otherwise. fn def_id_debug(def_id: rustc_hir::def_id::DefId, f: &mut fmt::Formatter<'_>) -> fmt::Result { write!(f, "DefId({}:{}", def_id.krate, def_id.index.index())?; tls::with_opt(|opt_tcx| { diff --git a/src/librustc_lint/Cargo.toml b/src/librustc_lint/Cargo.toml index 9785af5eab2..44a5ba3de51 100644 --- a/src/librustc_lint/Cargo.toml +++ b/src/librustc_lint/Cargo.toml @@ -11,7 +11,7 @@ path = "lib.rs" [dependencies] log = "0.4" unicode-security = "0.0.2" -rustc = { path = "../librustc" } +rustc_middle = { path = "../librustc_middle" } rustc_ast_pretty = { path = "../librustc_ast_pretty" } rustc_attr = { path = "../librustc_attr" } rustc_errors = { path = "../librustc_errors" } diff --git a/src/librustc_lint/builtin.rs b/src/librustc_lint/builtin.rs index 906e46edfe7..aee194d490f 100644 --- a/src/librustc_lint/builtin.rs +++ b/src/librustc_lint/builtin.rs @@ -50,7 +50,7 @@ use crate::nonstandard_style::{method_context, MethodLateContext}; use log::debug; use std::fmt::Write; -// hardwired lints from librustc +// hardwired lints from librustc_middle pub use rustc_session::lint::builtin::*; declare_lint! { diff --git a/src/librustc_metadata/Cargo.toml b/src/librustc_metadata/Cargo.toml index ea439b1f41d..a88ccd52e91 100644 --- a/src/librustc_metadata/Cargo.toml +++ b/src/librustc_metadata/Cargo.toml @@ -14,7 +14,7 @@ flate2 = "1.0" log = "0.4" memmap = "0.7" smallvec = { version = "1.0", features = ["union", "may_dangle"] } -rustc = { path = "../librustc" } +rustc_middle = { path = "../librustc_middle" } rustc_attr = { path = "../librustc_attr" } rustc_data_structures = { path = "../librustc_data_structures" } rustc_errors = { path = "../librustc_errors" } diff --git a/src/librustc_metadata/lib.rs b/src/librustc_metadata/lib.rs index 2993aed2f8a..22a2bf28041 100644 --- a/src/librustc_metadata/lib.rs +++ b/src/librustc_metadata/lib.rs @@ -14,7 +14,7 @@ extern crate libc; extern crate proc_macro; #[macro_use] -extern crate rustc; +extern crate rustc_middle; #[macro_use] extern crate rustc_data_structures; diff --git a/src/librustc/Cargo.toml b/src/librustc_middle/Cargo.toml similarity index 96% rename from src/librustc/Cargo.toml rename to src/librustc_middle/Cargo.toml index 1dd742c3549..dd322b9da95 100644 --- a/src/librustc/Cargo.toml +++ b/src/librustc_middle/Cargo.toml @@ -1,11 +1,11 @@ [package] authors = ["The Rust Project Developers"] -name = "rustc" +name = "rustc_middle" version = "0.0.0" edition = "2018" [lib] -name = "rustc" +name = "rustc_middle" path = "lib.rs" doctest = false diff --git a/src/librustc/README.md b/src/librustc_middle/README.md similarity index 100% rename from src/librustc/README.md rename to src/librustc_middle/README.md diff --git a/src/librustc/arena.rs b/src/librustc_middle/arena.rs similarity index 100% rename from src/librustc/arena.rs rename to src/librustc_middle/arena.rs diff --git a/src/librustc/benches/lib.rs b/src/librustc_middle/benches/lib.rs similarity index 100% rename from src/librustc/benches/lib.rs rename to src/librustc_middle/benches/lib.rs diff --git a/src/librustc/build.rs b/src/librustc_middle/build.rs similarity index 100% rename from src/librustc/build.rs rename to src/librustc_middle/build.rs diff --git a/src/librustc/dep_graph/dep_node.rs b/src/librustc_middle/dep_graph/dep_node.rs similarity index 100% rename from src/librustc/dep_graph/dep_node.rs rename to src/librustc_middle/dep_graph/dep_node.rs diff --git a/src/librustc/dep_graph/mod.rs b/src/librustc_middle/dep_graph/mod.rs similarity index 100% rename from src/librustc/dep_graph/mod.rs rename to src/librustc_middle/dep_graph/mod.rs diff --git a/src/librustc/hir/exports.rs b/src/librustc_middle/hir/exports.rs similarity index 100% rename from src/librustc/hir/exports.rs rename to src/librustc_middle/hir/exports.rs diff --git a/src/librustc/hir/map/blocks.rs b/src/librustc_middle/hir/map/blocks.rs similarity index 100% rename from src/librustc/hir/map/blocks.rs rename to src/librustc_middle/hir/map/blocks.rs diff --git a/src/librustc/hir/map/collector.rs b/src/librustc_middle/hir/map/collector.rs similarity index 100% rename from src/librustc/hir/map/collector.rs rename to src/librustc_middle/hir/map/collector.rs diff --git a/src/librustc/hir/map/mod.rs b/src/librustc_middle/hir/map/mod.rs similarity index 100% rename from src/librustc/hir/map/mod.rs rename to src/librustc_middle/hir/map/mod.rs diff --git a/src/librustc/hir/mod.rs b/src/librustc_middle/hir/mod.rs similarity index 100% rename from src/librustc/hir/mod.rs rename to src/librustc_middle/hir/mod.rs diff --git a/src/librustc/ich/hcx.rs b/src/librustc_middle/ich/hcx.rs similarity index 100% rename from src/librustc/ich/hcx.rs rename to src/librustc_middle/ich/hcx.rs diff --git a/src/librustc/ich/impls_hir.rs b/src/librustc_middle/ich/impls_hir.rs similarity index 100% rename from src/librustc/ich/impls_hir.rs rename to src/librustc_middle/ich/impls_hir.rs diff --git a/src/librustc/ich/impls_syntax.rs b/src/librustc_middle/ich/impls_syntax.rs similarity index 100% rename from src/librustc/ich/impls_syntax.rs rename to src/librustc_middle/ich/impls_syntax.rs diff --git a/src/librustc/ich/impls_ty.rs b/src/librustc_middle/ich/impls_ty.rs similarity index 100% rename from src/librustc/ich/impls_ty.rs rename to src/librustc_middle/ich/impls_ty.rs diff --git a/src/librustc/ich/mod.rs b/src/librustc_middle/ich/mod.rs similarity index 100% rename from src/librustc/ich/mod.rs rename to src/librustc_middle/ich/mod.rs diff --git a/src/librustc/infer/canonical.rs b/src/librustc_middle/infer/canonical.rs similarity index 100% rename from src/librustc/infer/canonical.rs rename to src/librustc_middle/infer/canonical.rs diff --git a/src/librustc/infer/mod.rs b/src/librustc_middle/infer/mod.rs similarity index 100% rename from src/librustc/infer/mod.rs rename to src/librustc_middle/infer/mod.rs diff --git a/src/librustc/infer/unify_key.rs b/src/librustc_middle/infer/unify_key.rs similarity index 100% rename from src/librustc/infer/unify_key.rs rename to src/librustc_middle/infer/unify_key.rs diff --git a/src/librustc/lib.rs b/src/librustc_middle/lib.rs similarity index 95% rename from src/librustc/lib.rs rename to src/librustc_middle/lib.rs index 6f18560a02d..f9d9ce1f312 100644 --- a/src/librustc/lib.rs +++ b/src/librustc_middle/lib.rs @@ -93,4 +93,6 @@ pub mod util { } // Allows macros to refer to this crate as `::rustc` +// FIXME(Centril): maybe change this at some point if `rustc_middle` +// is something we're going with long-term. extern crate self as rustc; diff --git a/src/librustc/lint.rs b/src/librustc_middle/lint.rs similarity index 100% rename from src/librustc/lint.rs rename to src/librustc_middle/lint.rs diff --git a/src/librustc/macros.rs b/src/librustc_middle/macros.rs similarity index 100% rename from src/librustc/macros.rs rename to src/librustc_middle/macros.rs diff --git a/src/librustc/middle/codegen_fn_attrs.rs b/src/librustc_middle/middle/codegen_fn_attrs.rs similarity index 100% rename from src/librustc/middle/codegen_fn_attrs.rs rename to src/librustc_middle/middle/codegen_fn_attrs.rs diff --git a/src/librustc/middle/cstore.rs b/src/librustc_middle/middle/cstore.rs similarity index 100% rename from src/librustc/middle/cstore.rs rename to src/librustc_middle/middle/cstore.rs diff --git a/src/librustc/middle/dependency_format.rs b/src/librustc_middle/middle/dependency_format.rs similarity index 100% rename from src/librustc/middle/dependency_format.rs rename to src/librustc_middle/middle/dependency_format.rs diff --git a/src/librustc/middle/exported_symbols.rs b/src/librustc_middle/middle/exported_symbols.rs similarity index 100% rename from src/librustc/middle/exported_symbols.rs rename to src/librustc_middle/middle/exported_symbols.rs diff --git a/src/librustc/middle/free_region.rs b/src/librustc_middle/middle/free_region.rs similarity index 100% rename from src/librustc/middle/free_region.rs rename to src/librustc_middle/middle/free_region.rs diff --git a/src/librustc/middle/lang_items.rs b/src/librustc_middle/middle/lang_items.rs similarity index 100% rename from src/librustc/middle/lang_items.rs rename to src/librustc_middle/middle/lang_items.rs diff --git a/src/librustc/middle/limits.rs b/src/librustc_middle/middle/limits.rs similarity index 100% rename from src/librustc/middle/limits.rs rename to src/librustc_middle/middle/limits.rs diff --git a/src/librustc/middle/mod.rs b/src/librustc_middle/middle/mod.rs similarity index 100% rename from src/librustc/middle/mod.rs rename to src/librustc_middle/middle/mod.rs diff --git a/src/librustc/middle/privacy.rs b/src/librustc_middle/middle/privacy.rs similarity index 100% rename from src/librustc/middle/privacy.rs rename to src/librustc_middle/middle/privacy.rs diff --git a/src/librustc/middle/region.rs b/src/librustc_middle/middle/region.rs similarity index 100% rename from src/librustc/middle/region.rs rename to src/librustc_middle/middle/region.rs diff --git a/src/librustc/middle/resolve_lifetime.rs b/src/librustc_middle/middle/resolve_lifetime.rs similarity index 100% rename from src/librustc/middle/resolve_lifetime.rs rename to src/librustc_middle/middle/resolve_lifetime.rs diff --git a/src/librustc/middle/stability.rs b/src/librustc_middle/middle/stability.rs similarity index 100% rename from src/librustc/middle/stability.rs rename to src/librustc_middle/middle/stability.rs diff --git a/src/librustc/mir/cache.rs b/src/librustc_middle/mir/cache.rs similarity index 100% rename from src/librustc/mir/cache.rs rename to src/librustc_middle/mir/cache.rs diff --git a/src/librustc/mir/interpret/allocation.rs b/src/librustc_middle/mir/interpret/allocation.rs similarity index 100% rename from src/librustc/mir/interpret/allocation.rs rename to src/librustc_middle/mir/interpret/allocation.rs diff --git a/src/librustc/mir/interpret/error.rs b/src/librustc_middle/mir/interpret/error.rs similarity index 100% rename from src/librustc/mir/interpret/error.rs rename to src/librustc_middle/mir/interpret/error.rs diff --git a/src/librustc/mir/interpret/mod.rs b/src/librustc_middle/mir/interpret/mod.rs similarity index 100% rename from src/librustc/mir/interpret/mod.rs rename to src/librustc_middle/mir/interpret/mod.rs diff --git a/src/librustc/mir/interpret/pointer.rs b/src/librustc_middle/mir/interpret/pointer.rs similarity index 100% rename from src/librustc/mir/interpret/pointer.rs rename to src/librustc_middle/mir/interpret/pointer.rs diff --git a/src/librustc/mir/interpret/queries.rs b/src/librustc_middle/mir/interpret/queries.rs similarity index 100% rename from src/librustc/mir/interpret/queries.rs rename to src/librustc_middle/mir/interpret/queries.rs diff --git a/src/librustc/mir/interpret/value.rs b/src/librustc_middle/mir/interpret/value.rs similarity index 100% rename from src/librustc/mir/interpret/value.rs rename to src/librustc_middle/mir/interpret/value.rs diff --git a/src/librustc/mir/mod.rs b/src/librustc_middle/mir/mod.rs similarity index 100% rename from src/librustc/mir/mod.rs rename to src/librustc_middle/mir/mod.rs diff --git a/src/librustc/mir/mono.rs b/src/librustc_middle/mir/mono.rs similarity index 100% rename from src/librustc/mir/mono.rs rename to src/librustc_middle/mir/mono.rs diff --git a/src/librustc/mir/query.rs b/src/librustc_middle/mir/query.rs similarity index 100% rename from src/librustc/mir/query.rs rename to src/librustc_middle/mir/query.rs diff --git a/src/librustc/mir/tcx.rs b/src/librustc_middle/mir/tcx.rs similarity index 100% rename from src/librustc/mir/tcx.rs rename to src/librustc_middle/mir/tcx.rs diff --git a/src/librustc/mir/traversal.rs b/src/librustc_middle/mir/traversal.rs similarity index 100% rename from src/librustc/mir/traversal.rs rename to src/librustc_middle/mir/traversal.rs diff --git a/src/librustc/mir/type_foldable.rs b/src/librustc_middle/mir/type_foldable.rs similarity index 100% rename from src/librustc/mir/type_foldable.rs rename to src/librustc_middle/mir/type_foldable.rs diff --git a/src/librustc/mir/visit.rs b/src/librustc_middle/mir/visit.rs similarity index 100% rename from src/librustc/mir/visit.rs rename to src/librustc_middle/mir/visit.rs diff --git a/src/librustc/query/mod.rs b/src/librustc_middle/query/mod.rs similarity index 100% rename from src/librustc/query/mod.rs rename to src/librustc_middle/query/mod.rs diff --git a/src/librustc/tests.rs b/src/librustc_middle/tests.rs similarity index 84% rename from src/librustc/tests.rs rename to src/librustc_middle/tests.rs index cf3ea2ffa93..757e0bd3bfb 100644 --- a/src/librustc/tests.rs +++ b/src/librustc_middle/tests.rs @@ -1,6 +1,6 @@ use super::*; -// FIXME(#27438): right now the unit tests of librustc don't refer to any actual +// FIXME(#27438): right now the unit tests of librustc_middle don't refer to any actual // functions generated in librustc_data_structures (all // references are through generic functions), but statics are // referenced from time to time. Due to this bug we won't diff --git a/src/librustc/traits/mod.rs b/src/librustc_middle/traits/mod.rs similarity index 100% rename from src/librustc/traits/mod.rs rename to src/librustc_middle/traits/mod.rs diff --git a/src/librustc/traits/query.rs b/src/librustc_middle/traits/query.rs similarity index 100% rename from src/librustc/traits/query.rs rename to src/librustc_middle/traits/query.rs diff --git a/src/librustc/traits/select.rs b/src/librustc_middle/traits/select.rs similarity index 100% rename from src/librustc/traits/select.rs rename to src/librustc_middle/traits/select.rs diff --git a/src/librustc/traits/specialization_graph.rs b/src/librustc_middle/traits/specialization_graph.rs similarity index 100% rename from src/librustc/traits/specialization_graph.rs rename to src/librustc_middle/traits/specialization_graph.rs diff --git a/src/librustc/traits/structural_impls.rs b/src/librustc_middle/traits/structural_impls.rs similarity index 100% rename from src/librustc/traits/structural_impls.rs rename to src/librustc_middle/traits/structural_impls.rs diff --git a/src/librustc/ty/_match.rs b/src/librustc_middle/ty/_match.rs similarity index 100% rename from src/librustc/ty/_match.rs rename to src/librustc_middle/ty/_match.rs diff --git a/src/librustc/ty/adjustment.rs b/src/librustc_middle/ty/adjustment.rs similarity index 100% rename from src/librustc/ty/adjustment.rs rename to src/librustc_middle/ty/adjustment.rs diff --git a/src/librustc/ty/binding.rs b/src/librustc_middle/ty/binding.rs similarity index 100% rename from src/librustc/ty/binding.rs rename to src/librustc_middle/ty/binding.rs diff --git a/src/librustc/ty/cast.rs b/src/librustc_middle/ty/cast.rs similarity index 100% rename from src/librustc/ty/cast.rs rename to src/librustc_middle/ty/cast.rs diff --git a/src/librustc/ty/codec.rs b/src/librustc_middle/ty/codec.rs similarity index 100% rename from src/librustc/ty/codec.rs rename to src/librustc_middle/ty/codec.rs diff --git a/src/librustc/ty/context.rs b/src/librustc_middle/ty/context.rs similarity index 100% rename from src/librustc/ty/context.rs rename to src/librustc_middle/ty/context.rs diff --git a/src/librustc/ty/diagnostics.rs b/src/librustc_middle/ty/diagnostics.rs similarity index 100% rename from src/librustc/ty/diagnostics.rs rename to src/librustc_middle/ty/diagnostics.rs diff --git a/src/librustc/ty/erase_regions.rs b/src/librustc_middle/ty/erase_regions.rs similarity index 100% rename from src/librustc/ty/erase_regions.rs rename to src/librustc_middle/ty/erase_regions.rs diff --git a/src/librustc/ty/error.rs b/src/librustc_middle/ty/error.rs similarity index 100% rename from src/librustc/ty/error.rs rename to src/librustc_middle/ty/error.rs diff --git a/src/librustc/ty/fast_reject.rs b/src/librustc_middle/ty/fast_reject.rs similarity index 100% rename from src/librustc/ty/fast_reject.rs rename to src/librustc_middle/ty/fast_reject.rs diff --git a/src/librustc/ty/flags.rs b/src/librustc_middle/ty/flags.rs similarity index 100% rename from src/librustc/ty/flags.rs rename to src/librustc_middle/ty/flags.rs diff --git a/src/librustc/ty/fold.rs b/src/librustc_middle/ty/fold.rs similarity index 100% rename from src/librustc/ty/fold.rs rename to src/librustc_middle/ty/fold.rs diff --git a/src/librustc/ty/free_region_map.rs b/src/librustc_middle/ty/free_region_map.rs similarity index 100% rename from src/librustc/ty/free_region_map.rs rename to src/librustc_middle/ty/free_region_map.rs diff --git a/src/librustc/ty/inhabitedness/def_id_forest.rs b/src/librustc_middle/ty/inhabitedness/def_id_forest.rs similarity index 100% rename from src/librustc/ty/inhabitedness/def_id_forest.rs rename to src/librustc_middle/ty/inhabitedness/def_id_forest.rs diff --git a/src/librustc/ty/inhabitedness/mod.rs b/src/librustc_middle/ty/inhabitedness/mod.rs similarity index 100% rename from src/librustc/ty/inhabitedness/mod.rs rename to src/librustc_middle/ty/inhabitedness/mod.rs diff --git a/src/librustc/ty/instance.rs b/src/librustc_middle/ty/instance.rs similarity index 100% rename from src/librustc/ty/instance.rs rename to src/librustc_middle/ty/instance.rs diff --git a/src/librustc/ty/layout.rs b/src/librustc_middle/ty/layout.rs similarity index 100% rename from src/librustc/ty/layout.rs rename to src/librustc_middle/ty/layout.rs diff --git a/src/librustc/ty/mod.rs b/src/librustc_middle/ty/mod.rs similarity index 100% rename from src/librustc/ty/mod.rs rename to src/librustc_middle/ty/mod.rs diff --git a/src/librustc/ty/normalize_erasing_regions.rs b/src/librustc_middle/ty/normalize_erasing_regions.rs similarity index 100% rename from src/librustc/ty/normalize_erasing_regions.rs rename to src/librustc_middle/ty/normalize_erasing_regions.rs diff --git a/src/librustc/ty/outlives.rs b/src/librustc_middle/ty/outlives.rs similarity index 100% rename from src/librustc/ty/outlives.rs rename to src/librustc_middle/ty/outlives.rs diff --git a/src/librustc/ty/print/mod.rs b/src/librustc_middle/ty/print/mod.rs similarity index 100% rename from src/librustc/ty/print/mod.rs rename to src/librustc_middle/ty/print/mod.rs diff --git a/src/librustc/ty/print/obsolete.rs b/src/librustc_middle/ty/print/obsolete.rs similarity index 100% rename from src/librustc/ty/print/obsolete.rs rename to src/librustc_middle/ty/print/obsolete.rs diff --git a/src/librustc/ty/print/pretty.rs b/src/librustc_middle/ty/print/pretty.rs similarity index 100% rename from src/librustc/ty/print/pretty.rs rename to src/librustc_middle/ty/print/pretty.rs diff --git a/src/librustc/ty/query/README.md b/src/librustc_middle/ty/query/README.md similarity index 100% rename from src/librustc/ty/query/README.md rename to src/librustc_middle/ty/query/README.md diff --git a/src/librustc/ty/query/job.rs b/src/librustc_middle/ty/query/job.rs similarity index 100% rename from src/librustc/ty/query/job.rs rename to src/librustc_middle/ty/query/job.rs diff --git a/src/librustc/ty/query/keys.rs b/src/librustc_middle/ty/query/keys.rs similarity index 100% rename from src/librustc/ty/query/keys.rs rename to src/librustc_middle/ty/query/keys.rs diff --git a/src/librustc/ty/query/mod.rs b/src/librustc_middle/ty/query/mod.rs similarity index 100% rename from src/librustc/ty/query/mod.rs rename to src/librustc_middle/ty/query/mod.rs diff --git a/src/librustc/ty/query/on_disk_cache.rs b/src/librustc_middle/ty/query/on_disk_cache.rs similarity index 100% rename from src/librustc/ty/query/on_disk_cache.rs rename to src/librustc_middle/ty/query/on_disk_cache.rs diff --git a/src/librustc/ty/query/plumbing.rs b/src/librustc_middle/ty/query/plumbing.rs similarity index 100% rename from src/librustc/ty/query/plumbing.rs rename to src/librustc_middle/ty/query/plumbing.rs diff --git a/src/librustc/ty/query/profiling_support.rs b/src/librustc_middle/ty/query/profiling_support.rs similarity index 100% rename from src/librustc/ty/query/profiling_support.rs rename to src/librustc_middle/ty/query/profiling_support.rs diff --git a/src/librustc/ty/query/stats.rs b/src/librustc_middle/ty/query/stats.rs similarity index 100% rename from src/librustc/ty/query/stats.rs rename to src/librustc_middle/ty/query/stats.rs diff --git a/src/librustc/ty/query/values.rs b/src/librustc_middle/ty/query/values.rs similarity index 100% rename from src/librustc/ty/query/values.rs rename to src/librustc_middle/ty/query/values.rs diff --git a/src/librustc/ty/relate.rs b/src/librustc_middle/ty/relate.rs similarity index 100% rename from src/librustc/ty/relate.rs rename to src/librustc_middle/ty/relate.rs diff --git a/src/librustc/ty/steal.rs b/src/librustc_middle/ty/steal.rs similarity index 100% rename from src/librustc/ty/steal.rs rename to src/librustc_middle/ty/steal.rs diff --git a/src/librustc/ty/structural_impls.rs b/src/librustc_middle/ty/structural_impls.rs similarity index 100% rename from src/librustc/ty/structural_impls.rs rename to src/librustc_middle/ty/structural_impls.rs diff --git a/src/librustc/ty/sty.rs b/src/librustc_middle/ty/sty.rs similarity index 100% rename from src/librustc/ty/sty.rs rename to src/librustc_middle/ty/sty.rs diff --git a/src/librustc/ty/subst.rs b/src/librustc_middle/ty/subst.rs similarity index 100% rename from src/librustc/ty/subst.rs rename to src/librustc_middle/ty/subst.rs diff --git a/src/librustc/ty/trait_def.rs b/src/librustc_middle/ty/trait_def.rs similarity index 100% rename from src/librustc/ty/trait_def.rs rename to src/librustc_middle/ty/trait_def.rs diff --git a/src/librustc/ty/util.rs b/src/librustc_middle/ty/util.rs similarity index 100% rename from src/librustc/ty/util.rs rename to src/librustc_middle/ty/util.rs diff --git a/src/librustc/ty/walk.rs b/src/librustc_middle/ty/walk.rs similarity index 100% rename from src/librustc/ty/walk.rs rename to src/librustc_middle/ty/walk.rs diff --git a/src/librustc/util/bug.rs b/src/librustc_middle/util/bug.rs similarity index 100% rename from src/librustc/util/bug.rs rename to src/librustc_middle/util/bug.rs diff --git a/src/librustc/util/common.rs b/src/librustc_middle/util/common.rs similarity index 100% rename from src/librustc/util/common.rs rename to src/librustc_middle/util/common.rs diff --git a/src/librustc/util/common/tests.rs b/src/librustc_middle/util/common/tests.rs similarity index 100% rename from src/librustc/util/common/tests.rs rename to src/librustc_middle/util/common/tests.rs diff --git a/src/librustc_mir/Cargo.toml b/src/librustc_mir/Cargo.toml index 256a80076b9..f9b195e92eb 100644 --- a/src/librustc_mir/Cargo.toml +++ b/src/librustc_mir/Cargo.toml @@ -16,7 +16,7 @@ itertools = "0.8" log = "0.4" log_settings = "0.1.1" polonius-engine = "0.12.0" -rustc = { path = "../librustc" } +rustc_middle = { path = "../librustc_middle" } rustc_ast_pretty = { path = "../librustc_ast_pretty" } rustc_attr = { path = "../librustc_attr" } rustc_data_structures = { path = "../librustc_data_structures" } diff --git a/src/librustc_mir/const_eval/error.rs b/src/librustc_mir/const_eval/error.rs index aa30f43df93..d2c35a9d1f7 100644 --- a/src/librustc_mir/const_eval/error.rs +++ b/src/librustc_mir/const_eval/error.rs @@ -18,7 +18,7 @@ pub enum ConstEvalErrKind { } // The errors become `MachineStop` with plain strings when being raised. -// `ConstEvalErr` (in `librustc/mir/interpret/error.rs`) knows to +// `ConstEvalErr` (in `librustc_middle/mir/interpret/error.rs`) knows to // handle these. impl<'tcx> Into> for ConstEvalErrKind { fn into(self) -> InterpErrorInfo<'tcx> { diff --git a/src/librustc_mir/interpret/intrinsics.rs b/src/librustc_mir/interpret/intrinsics.rs index 46f8e98ef34..6297a87b346 100644 --- a/src/librustc_mir/interpret/intrinsics.rs +++ b/src/librustc_mir/interpret/intrinsics.rs @@ -98,7 +98,7 @@ impl<'mir, 'tcx, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> { }; // Keep the patterns in this match ordered the same as the list in - // `src/librustc/ty/constness.rs` + // `src/librustc_middle/ty/constness.rs` match intrinsic_name { sym::caller_location => { let span = self.find_closest_untracked_caller_location().unwrap_or(span); diff --git a/src/librustc_mir_build/Cargo.toml b/src/librustc_mir_build/Cargo.toml index 96716dbd604..143a3852d73 100644 --- a/src/librustc_mir_build/Cargo.toml +++ b/src/librustc_mir_build/Cargo.toml @@ -12,7 +12,7 @@ doctest = false [dependencies] arena = { path = "../libarena" } log = "0.4" -rustc = { path = "../librustc" } +rustc_middle = { path = "../librustc_middle" } rustc_apfloat = { path = "../librustc_apfloat" } rustc_attr = { path = "../librustc_attr" } rustc_data_structures = { path = "../librustc_data_structures" } diff --git a/src/librustc_passes/Cargo.toml b/src/librustc_passes/Cargo.toml index 8acb88f58d3..0ffc8170b50 100644 --- a/src/librustc_passes/Cargo.toml +++ b/src/librustc_passes/Cargo.toml @@ -10,7 +10,7 @@ path = "lib.rs" [dependencies] log = "0.4" -rustc = { path = "../librustc" } +rustc_middle = { path = "../librustc_middle" } rustc_attr = { path = "../librustc_attr" } rustc_data_structures = { path = "../librustc_data_structures" } rustc_errors = { path = "../librustc_errors" } diff --git a/src/librustc_passes/stability.rs b/src/librustc_passes/stability.rs index 8fa5a4fbc61..80484a89d4a 100644 --- a/src/librustc_passes/stability.rs +++ b/src/librustc_passes/stability.rs @@ -438,7 +438,7 @@ fn new_index(tcx: TyCtxt<'tcx>) -> Index<'tcx> { // If the `-Z force-unstable-if-unmarked` flag is passed then we provide // a parent stability annotation which indicates that this is private // with the `rustc_private` feature. This is intended for use when - // compiling librustc crates themselves so we can leverage crates.io + // compiling librustc_middle crates themselves so we can leverage crates.io // while maintaining the invariant that all sysroot crates are unstable // by default and are unable to be used. if tcx.sess.opts.debugging_opts.force_unstable_if_unmarked { diff --git a/src/librustc_plugin_impl/Cargo.toml b/src/librustc_plugin_impl/Cargo.toml index 372d6a534c8..38cfbd48de2 100644 --- a/src/librustc_plugin_impl/Cargo.toml +++ b/src/librustc_plugin_impl/Cargo.toml @@ -11,7 +11,7 @@ path = "lib.rs" doctest = false [dependencies] -rustc = { path = "../librustc" } +rustc_middle = { path = "../librustc_middle" } rustc_errors = { path = "../librustc_errors" } rustc_hir = { path = "../librustc_hir" } rustc_lint = { path = "../librustc_lint" } diff --git a/src/librustc_privacy/Cargo.toml b/src/librustc_privacy/Cargo.toml index 9854e0f6c53..34146113f0e 100644 --- a/src/librustc_privacy/Cargo.toml +++ b/src/librustc_privacy/Cargo.toml @@ -9,7 +9,7 @@ name = "rustc_privacy" path = "lib.rs" [dependencies] -rustc = { path = "../librustc" } +rustc_middle = { path = "../librustc_middle" } rustc_attr = { path = "../librustc_attr" } rustc_errors = { path = "../librustc_errors" } rustc_hir = { path = "../librustc_hir" } diff --git a/src/librustc_query_system/dep_graph/dep_node.rs b/src/librustc_query_system/dep_graph/dep_node.rs index b1d332da115..99eb3cdc0b0 100644 --- a/src/librustc_query_system/dep_graph/dep_node.rs +++ b/src/librustc_query_system/dep_graph/dep_node.rs @@ -26,7 +26,7 @@ //! could not be instantiated because the current compilation session //! contained no `DefId` for thing that had been removed. //! -//! `DepNode` definition happens in `librustc` with the `define_dep_nodes!()` macro. +//! `DepNode` definition happens in `librustc_middle` with the `define_dep_nodes!()` macro. //! This macro defines the `DepKind` enum and a corresponding `DepConstructor` enum. The //! `DepConstructor` enum links a `DepKind` to the parameters that are needed at runtime in order //! to construct a valid `DepNode` fingerprint. diff --git a/src/librustc_query_system/query/config.rs b/src/librustc_query_system/query/config.rs index 20dad0bd47e..06e3302b263 100644 --- a/src/librustc_query_system/query/config.rs +++ b/src/librustc_query_system/query/config.rs @@ -13,8 +13,8 @@ use std::borrow::Cow; use std::fmt::Debug; use std::hash::Hash; -// The parameter `CTX` is required in librustc: implementations may need to access the `'tcx` -// lifetime in `CTX = TyCtxt<'tcx>`. +// The parameter `CTX` is required in librustc_middle: +// implementations may need to access the `'tcx` lifetime in `CTX = TyCtxt<'tcx>`. pub trait QueryConfig { const NAME: &'static str; const CATEGORY: ProfileCategory; diff --git a/src/librustc_resolve/Cargo.toml b/src/librustc_resolve/Cargo.toml index 49f079ad270..420a82d6d2c 100644 --- a/src/librustc_resolve/Cargo.toml +++ b/src/librustc_resolve/Cargo.toml @@ -15,7 +15,7 @@ bitflags = "1.2.1" log = "0.4" rustc_ast = { path = "../librustc_ast" } arena = { path = "../libarena" } -rustc = { path = "../librustc" } +rustc_middle = { path = "../librustc_middle" } rustc_ast_lowering = { path = "../librustc_ast_lowering" } rustc_ast_pretty = { path = "../librustc_ast_pretty" } rustc_attr = { path = "../librustc_attr" } diff --git a/src/librustc_save_analysis/Cargo.toml b/src/librustc_save_analysis/Cargo.toml index 623da1ddcb4..5948c88054d 100644 --- a/src/librustc_save_analysis/Cargo.toml +++ b/src/librustc_save_analysis/Cargo.toml @@ -10,7 +10,7 @@ path = "lib.rs" [dependencies] log = "0.4" -rustc = { path = "../librustc" } +rustc_middle = { path = "../librustc_middle" } rustc_ast = { path = "../librustc_ast" } rustc_ast_pretty = { path = "../librustc_ast_pretty" } rustc_data_structures = { path = "../librustc_data_structures" } diff --git a/src/librustc_session/filesearch.rs b/src/librustc_session/filesearch.rs index 05e6da43ea7..4310c508443 100644 --- a/src/librustc_session/filesearch.rs +++ b/src/librustc_session/filesearch.rs @@ -143,7 +143,7 @@ fn find_libdir(sysroot: &Path) -> Cow<'static, str> { // FIXME: This is a quick hack to make the rustc binary able to locate // Rust libraries in Linux environments where libraries might be installed // to lib64/lib32. This would be more foolproof by basing the sysroot off - // of the directory where librustc is located, rather than where the rustc + // of the directory where librustc_middle is located, rather than where the rustc // binary is. // If --libdir is set during configuration to the value other than // "lib" (i.e., non-default), this value is used (see issue #16552). diff --git a/src/librustc_session/lint.rs b/src/librustc_session/lint.rs index 1162cff4e0b..f75a3a32d7a 100644 --- a/src/librustc_session/lint.rs +++ b/src/librustc_session/lint.rs @@ -195,7 +195,7 @@ pub enum BuiltinLintDiagnostics { } /// Lints that are buffered up early on in the `Session` before the -/// `LintLevels` is calculated. These are later passed to `librustc`. +/// `LintLevels` is calculated. These are later passed to `librustc_middle`. #[derive(PartialEq)] pub struct BufferedEarlyLint { /// The span of code that we are linting on. diff --git a/src/librustc_span/lib.rs b/src/librustc_span/lib.rs index a0c4c90722d..3bcc20d36e7 100644 --- a/src/librustc_span/lib.rs +++ b/src/librustc_span/lib.rs @@ -1544,7 +1544,7 @@ fn lookup_line(lines: &[BytePos], pos: BytePos) -> isize { /// Requirements for a `StableHashingContext` to be used in this crate. /// This is a hack to allow using the `HashStable_Generic` derive macro -/// instead of implementing everything in librustc. +/// instead of implementing everything in librustc_middle. pub trait HashStableContext { fn hash_spans(&self) -> bool; fn hash_def_id(&mut self, _: DefId, hasher: &mut StableHasher); diff --git a/src/librustc_symbol_mangling/Cargo.toml b/src/librustc_symbol_mangling/Cargo.toml index 1e4fc8f7e68..5d091499c8c 100644 --- a/src/librustc_symbol_mangling/Cargo.toml +++ b/src/librustc_symbol_mangling/Cargo.toml @@ -16,7 +16,7 @@ rustc-demangle = "0.1.16" rustc_ast = { path = "../librustc_ast" } rustc_span = { path = "../librustc_span" } -rustc = { path = "../librustc" } +rustc_middle = { path = "../librustc_middle" } rustc_hir = { path = "../librustc_hir" } rustc_target = { path = "../librustc_target" } rustc_data_structures = { path = "../librustc_data_structures" } diff --git a/src/librustc_target/lib.rs b/src/librustc_target/lib.rs index 98190867d49..b2965fb8806 100644 --- a/src/librustc_target/lib.rs +++ b/src/librustc_target/lib.rs @@ -25,5 +25,5 @@ pub mod spec; /// Requirements for a `StableHashingContext` to be used in this crate. /// This is a hack to allow using the `HashStable_Generic` derive macro -/// instead of implementing everything in librustc. +/// instead of implementing everything in librustc_middle. pub trait HashStableContext {} diff --git a/src/librustc_trait_selection/Cargo.toml b/src/librustc_trait_selection/Cargo.toml index 5b2da41d066..254695e53e0 100644 --- a/src/librustc_trait_selection/Cargo.toml +++ b/src/librustc_trait_selection/Cargo.toml @@ -13,7 +13,7 @@ doctest = false fmt_macros = { path = "../libfmt_macros" } log = { version = "0.4", features = ["release_max_level_info", "std"] } rustc_attr = { path = "../librustc_attr" } -rustc = { path = "../librustc" } +rustc_middle = { path = "../librustc_middle" } rustc_ast = { path = "../librustc_ast" } rustc_data_structures = { path = "../librustc_data_structures" } rustc_errors = { path = "../librustc_errors" } diff --git a/src/librustc_traits/Cargo.toml b/src/librustc_traits/Cargo.toml index 5e33efb1cf9..432004c1049 100644 --- a/src/librustc_traits/Cargo.toml +++ b/src/librustc_traits/Cargo.toml @@ -10,7 +10,7 @@ path = "lib.rs" [dependencies] log = { version = "0.4" } -rustc = { path = "../librustc" } +rustc_middle = { path = "../librustc_middle" } rustc_data_structures = { path = "../librustc_data_structures" } rustc_hir = { path = "../librustc_hir" } rustc_macros = { path = "../librustc_macros" } diff --git a/src/librustc_ty/Cargo.toml b/src/librustc_ty/Cargo.toml index cf0b4b82eea..37d1ed38d79 100644 --- a/src/librustc_ty/Cargo.toml +++ b/src/librustc_ty/Cargo.toml @@ -10,7 +10,7 @@ path = "lib.rs" [dependencies] log = "0.4" -rustc = { path = "../librustc" } +rustc_middle = { path = "../librustc_middle" } rustc_data_structures = { path = "../librustc_data_structures" } rustc_hir = { path = "../librustc_hir" } rustc_infer = { path = "../librustc_infer" } diff --git a/src/librustc_typeck/Cargo.toml b/src/librustc_typeck/Cargo.toml index e61a36f844f..8aaa29bc582 100644 --- a/src/librustc_typeck/Cargo.toml +++ b/src/librustc_typeck/Cargo.toml @@ -13,7 +13,7 @@ doctest = false [dependencies] arena = { path = "../libarena" } log = "0.4" -rustc = { path = "../librustc" } +rustc_middle = { path = "../librustc_middle" } rustc_attr = { path = "../librustc_attr" } rustc_data_structures = { path = "../librustc_data_structures" } rustc_errors = { path = "../librustc_errors" } diff --git a/src/librustc_typeck/check/generator_interior.rs b/src/librustc_typeck/check/generator_interior.rs index cdf68256a7a..0bb9f310ed8 100644 --- a/src/librustc_typeck/check/generator_interior.rs +++ b/src/librustc_typeck/check/generator_interior.rs @@ -205,7 +205,7 @@ pub fn resolve_interior<'a, 'tcx>( } // This visitor has to have the same visit_expr calls as RegionResolutionVisitor in -// librustc/middle/region.rs since `expr_count` is compared against the results +// librustc_middle/middle/region.rs since `expr_count` is compared against the results // there. impl<'a, 'tcx> Visitor<'tcx> for InteriorVisitor<'a, 'tcx> { type Map = intravisit::ErasedMap<'tcx>; diff --git a/src/librustdoc/core.rs b/src/librustdoc/core.rs index fe3a9b6b3dc..7209f0ae2d5 100644 --- a/src/librustdoc/core.rs +++ b/src/librustdoc/core.rs @@ -103,7 +103,7 @@ impl<'tcx> DocContext<'tcx> { } // This is an ugly hack, but it's the simplest way to handle synthetic impls without greatly - // refactoring either librustdoc or librustc. In particular, allowing new DefIds to be + // refactoring either librustdoc or librustc_middle. In particular, allowing new DefIds to be // registered after the AST is constructed would require storing the defid mapping in a // RefCell, decreasing the performance for normal compilation for very little gain. // diff --git a/src/libstd/alloc.rs b/src/libstd/alloc.rs index 25f3ddcbeba..79dd89e53bb 100644 --- a/src/libstd/alloc.rs +++ b/src/libstd/alloc.rs @@ -253,7 +253,7 @@ pub mod __default_lib_allocator { // `__rust_alloc` etc symbols (see `src/liballoc/alloc.rs) when there is // no `#[global_allocator]` attribute. - // for symbol names src/librustc/middle/allocator.rs + // for symbol names src/librustc_middle/middle/allocator.rs // for signatures src/librustc_allocator/lib.rs // linkage directives are provided as part of the current compiler allocator