diff options
| author | Josh Triplett <josh@joshtriplett.org> | 2025-08-14 02:54:50 -0700 |
|---|---|---|
| committer | Josh Triplett <josh@joshtriplett.org> | 2025-08-20 15:04:00 -0700 |
| commit | 0f0d7024f5a5ab6d3db5202772b2dd7e7a781d26 (patch) | |
| tree | 8547a92df683831d55f40ed735762f924a8a1482 | |
| parent | bad4f5c13fa3c48cdc888c2f38bebf8c36440ccc (diff) | |
| download | rust-0f0d7024f5a5ab6d3db5202772b2dd7e7a781d26.tar.gz rust-0f0d7024f5a5ab6d3db5202772b2dd7e7a781d26.zip | |
Eliminate unnecessary dependency from `rustc_traits` to `rustc_hir`
`rustc_traits` only uses `DefId`, which is a re-export from `rustc_span`.
| -rw-r--r-- | Cargo.lock | 1 | ||||
| -rw-r--r-- | compiler/rustc_traits/Cargo.toml | 1 | ||||
| -rw-r--r-- | compiler/rustc_traits/src/coroutine_witnesses.rs | 2 | ||||
| -rw-r--r-- | compiler/rustc_traits/src/dropck_outlives.rs | 2 |
4 files changed, 2 insertions, 4 deletions
diff --git a/Cargo.lock b/Cargo.lock index ea0ab91b87a..6f7a309894c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4722,7 +4722,6 @@ name = "rustc_traits" version = "0.0.0" dependencies = [ "rustc_data_structures", - "rustc_hir", "rustc_infer", "rustc_middle", "rustc_span", diff --git a/compiler/rustc_traits/Cargo.toml b/compiler/rustc_traits/Cargo.toml index 04aef4e7b9e..9f40f4d5c23 100644 --- a/compiler/rustc_traits/Cargo.toml +++ b/compiler/rustc_traits/Cargo.toml @@ -6,7 +6,6 @@ edition = "2024" [dependencies] # tidy-alphabetical-start rustc_data_structures = { path = "../rustc_data_structures" } -rustc_hir = { path = "../rustc_hir" } rustc_infer = { path = "../rustc_infer" } rustc_middle = { path = "../rustc_middle" } rustc_span = { path = "../rustc_span" } diff --git a/compiler/rustc_traits/src/coroutine_witnesses.rs b/compiler/rustc_traits/src/coroutine_witnesses.rs index 8a2a0832ddb..20f9b013724 100644 --- a/compiler/rustc_traits/src/coroutine_witnesses.rs +++ b/compiler/rustc_traits/src/coroutine_witnesses.rs @@ -1,9 +1,9 @@ -use rustc_hir::def_id::DefId; use rustc_infer::infer::TyCtxtInferExt; use rustc_infer::infer::canonical::query_response::make_query_region_constraints; use rustc_infer::infer::resolve::OpportunisticRegionResolver; use rustc_infer::traits::{Obligation, ObligationCause}; use rustc_middle::ty::{self, Ty, TyCtxt, TypeFoldable, TypeVisitableExt, fold_regions}; +use rustc_span::def_id::DefId; use rustc_trait_selection::traits::{ObligationCtxt, with_replaced_escaping_bound_vars}; /// Return the set of types that should be taken into account when checking diff --git a/compiler/rustc_traits/src/dropck_outlives.rs b/compiler/rustc_traits/src/dropck_outlives.rs index 5eddad39e2b..d33ade7a9e1 100644 --- a/compiler/rustc_traits/src/dropck_outlives.rs +++ b/compiler/rustc_traits/src/dropck_outlives.rs @@ -1,5 +1,4 @@ use rustc_data_structures::fx::FxHashSet; -use rustc_hir::def_id::DefId; use rustc_infer::infer::TyCtxtInferExt; use rustc_infer::infer::canonical::{Canonical, QueryResponse}; use rustc_middle::bug; @@ -7,6 +6,7 @@ use rustc_middle::query::Providers; use rustc_middle::traits::query::{DropckConstraint, DropckOutlivesResult}; use rustc_middle::ty::{self, GenericArgs, TyCtxt}; use rustc_span::DUMMY_SP; +use rustc_span::def_id::DefId; use rustc_trait_selection::infer::InferCtxtBuilderExt; use rustc_trait_selection::traits::query::dropck_outlives::{ compute_dropck_outlives_inner, dtorck_constraint_for_ty_inner, |
