From f59d03038c8601a66bd165a2f1980109665d077c Mon Sep 17 00:00:00 2001 From: LeSeulArtichaut Date: Thu, 19 Nov 2020 21:32:37 +0100 Subject: [PATCH] Move `rustc_ty` -> `rustc_ty_utils` --- Cargo.lock | 4 ++-- .../src/infer/error_reporting/nice_region_error/util.rs | 2 +- compiler/rustc_interface/Cargo.toml | 2 +- compiler/rustc_interface/src/passes.rs | 2 +- compiler/rustc_trait_selection/src/traits/project.rs | 2 +- compiler/{rustc_ty => rustc_ty_utils}/Cargo.toml | 2 +- compiler/{rustc_ty => rustc_ty_utils}/src/common_traits.rs | 0 compiler/{rustc_ty => rustc_ty_utils}/src/instance.rs | 0 compiler/{rustc_ty => rustc_ty_utils}/src/lib.rs | 0 compiler/{rustc_ty => rustc_ty_utils}/src/needs_drop.rs | 0 compiler/{rustc_ty => rustc_ty_utils}/src/ty.rs | 0 11 files changed, 7 insertions(+), 7 deletions(-) rename compiler/{rustc_ty => rustc_ty_utils}/Cargo.toml (95%) rename compiler/{rustc_ty => rustc_ty_utils}/src/common_traits.rs (100%) rename compiler/{rustc_ty => rustc_ty_utils}/src/instance.rs (100%) rename compiler/{rustc_ty => rustc_ty_utils}/src/lib.rs (100%) rename compiler/{rustc_ty => rustc_ty_utils}/src/needs_drop.rs (100%) rename compiler/{rustc_ty => rustc_ty_utils}/src/ty.rs (100%) diff --git a/Cargo.lock b/Cargo.lock index 928d19b1e2c3f..b5abab7ba965d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3802,7 +3802,7 @@ dependencies = [ "rustc_target", "rustc_trait_selection", "rustc_traits", - "rustc_ty", + "rustc_ty_utils", "rustc_typeck", "smallvec 1.4.2", "tempfile", @@ -4240,7 +4240,7 @@ dependencies = [ ] [[package]] -name = "rustc_ty" +name = "rustc_ty_utils" version = "0.0.0" dependencies = [ "rustc_data_structures", diff --git a/compiler/rustc_infer/src/infer/error_reporting/nice_region_error/util.rs b/compiler/rustc_infer/src/infer/error_reporting/nice_region_error/util.rs index 8d0100440a8a5..61fad8863e7c4 100644 --- a/compiler/rustc_infer/src/infer/error_reporting/nice_region_error/util.rs +++ b/compiler/rustc_infer/src/infer/error_reporting/nice_region_error/util.rs @@ -131,7 +131,7 @@ impl<'a, 'tcx> NiceRegionError<'a, 'tcx> { } pub(super) fn asyncness(&self, local_def_id: LocalDefId) -> Option { - // similar to the asyncness fn in rustc_ty::ty + // similar to the asyncness fn in rustc_ty_utils::ty let hir_id = self.tcx().hir().local_def_id_to_hir_id(local_def_id); let node = self.tcx().hir().get(hir_id); let fn_like = rustc_middle::hir::map::blocks::FnLikeNode::from_node(node)?; diff --git a/compiler/rustc_interface/Cargo.toml b/compiler/rustc_interface/Cargo.toml index e214493a567b8..2481a27dee795 100644 --- a/compiler/rustc_interface/Cargo.toml +++ b/compiler/rustc_interface/Cargo.toml @@ -41,7 +41,7 @@ rustc_plugin_impl = { path = "../rustc_plugin_impl" } rustc_privacy = { path = "../rustc_privacy" } rustc_resolve = { path = "../rustc_resolve" } rustc_trait_selection = { path = "../rustc_trait_selection" } -rustc_ty = { path = "../rustc_ty" } +rustc_ty_utils = { path = "../rustc_ty_utils" } tempfile = "3.0.5" [target.'cfg(windows)'.dependencies] diff --git a/compiler/rustc_interface/src/passes.rs b/compiler/rustc_interface/src/passes.rs index 82cf4ab7f5c08..5fd560d7effb3 100644 --- a/compiler/rustc_interface/src/passes.rs +++ b/compiler/rustc_interface/src/passes.rs @@ -699,7 +699,7 @@ pub static DEFAULT_QUERY_PROVIDERS: SyncLazy = SyncLazy::new(|| { rustc_passes::provide(providers); rustc_resolve::provide(providers); rustc_traits::provide(providers); - rustc_ty::provide(providers); + rustc_ty_utils::provide(providers); rustc_metadata::provide(providers); rustc_lint::provide(providers); rustc_symbol_mangling::provide(providers); diff --git a/compiler/rustc_trait_selection/src/traits/project.rs b/compiler/rustc_trait_selection/src/traits/project.rs index dead795c6afe7..df472e6ed7e9d 100644 --- a/compiler/rustc_trait_selection/src/traits/project.rs +++ b/compiler/rustc_trait_selection/src/traits/project.rs @@ -997,7 +997,7 @@ fn assemble_candidates_from_impls<'cx, 'tcx>( // type. // // NOTE: This should be kept in sync with the similar code in - // `rustc_ty::instance::resolve_associated_item()`. + // `rustc_ty_utils::instance::resolve_associated_item()`. let node_item = assoc_ty_def(selcx, impl_data.impl_def_id, obligation.predicate.item_def_id) .map_err(|ErrorReported| ())?; diff --git a/compiler/rustc_ty/Cargo.toml b/compiler/rustc_ty_utils/Cargo.toml similarity index 95% rename from compiler/rustc_ty/Cargo.toml rename to compiler/rustc_ty_utils/Cargo.toml index acb011b2dc063..5020437bcf9cc 100644 --- a/compiler/rustc_ty/Cargo.toml +++ b/compiler/rustc_ty_utils/Cargo.toml @@ -1,6 +1,6 @@ [package] authors = ["The Rust Project Developers"] -name = "rustc_ty" +name = "rustc_ty_utils" version = "0.0.0" edition = "2018" diff --git a/compiler/rustc_ty/src/common_traits.rs b/compiler/rustc_ty_utils/src/common_traits.rs similarity index 100% rename from compiler/rustc_ty/src/common_traits.rs rename to compiler/rustc_ty_utils/src/common_traits.rs diff --git a/compiler/rustc_ty/src/instance.rs b/compiler/rustc_ty_utils/src/instance.rs similarity index 100% rename from compiler/rustc_ty/src/instance.rs rename to compiler/rustc_ty_utils/src/instance.rs diff --git a/compiler/rustc_ty/src/lib.rs b/compiler/rustc_ty_utils/src/lib.rs similarity index 100% rename from compiler/rustc_ty/src/lib.rs rename to compiler/rustc_ty_utils/src/lib.rs diff --git a/compiler/rustc_ty/src/needs_drop.rs b/compiler/rustc_ty_utils/src/needs_drop.rs similarity index 100% rename from compiler/rustc_ty/src/needs_drop.rs rename to compiler/rustc_ty_utils/src/needs_drop.rs diff --git a/compiler/rustc_ty/src/ty.rs b/compiler/rustc_ty_utils/src/ty.rs similarity index 100% rename from compiler/rustc_ty/src/ty.rs rename to compiler/rustc_ty_utils/src/ty.rs