Skip to content

Commit 6ef4052

Browse files
committed
Eliminate unnecessary dependency from rustc_traits to rustc_hir
`rustc_traits` only uses `DefId`, which is a re-export from `rustc_span`.
1 parent 3410bcc commit 6ef4052

File tree

4 files changed

+2
-4
lines changed

4 files changed

+2
-4
lines changed

Cargo.lock

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4722,7 +4722,6 @@ name = "rustc_traits"
47224722
version = "0.0.0"
47234723
dependencies = [
47244724
"rustc_data_structures",
4725-
"rustc_hir",
47264725
"rustc_infer",
47274726
"rustc_middle",
47284727
"rustc_span",

compiler/rustc_traits/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ edition = "2024"
66
[dependencies]
77
# tidy-alphabetical-start
88
rustc_data_structures = { path = "../rustc_data_structures" }
9-
rustc_hir = { path = "../rustc_hir" }
109
rustc_infer = { path = "../rustc_infer" }
1110
rustc_middle = { path = "../rustc_middle" }
1211
rustc_span = { path = "../rustc_span" }

compiler/rustc_traits/src/coroutine_witnesses.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
use rustc_hir::def_id::DefId;
21
use rustc_infer::infer::TyCtxtInferExt;
32
use rustc_infer::infer::canonical::query_response::make_query_region_constraints;
43
use rustc_infer::infer::resolve::OpportunisticRegionResolver;
54
use rustc_infer::traits::{Obligation, ObligationCause};
65
use rustc_middle::ty::{self, Ty, TyCtxt, TypeFoldable, TypeVisitableExt, fold_regions};
6+
use rustc_span::def_id::DefId;
77
use rustc_trait_selection::traits::{ObligationCtxt, with_replaced_escaping_bound_vars};
88

99
/// Return the set of types that should be taken into account when checking

compiler/rustc_traits/src/dropck_outlives.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
use rustc_data_structures::fx::FxHashSet;
2-
use rustc_hir::def_id::DefId;
32
use rustc_infer::infer::TyCtxtInferExt;
43
use rustc_infer::infer::canonical::{Canonical, QueryResponse};
54
use rustc_middle::bug;
65
use rustc_middle::query::Providers;
76
use rustc_middle::traits::query::{DropckConstraint, DropckOutlivesResult};
87
use rustc_middle::ty::{self, GenericArgs, TyCtxt};
98
use rustc_span::DUMMY_SP;
9+
use rustc_span::def_id::DefId;
1010
use rustc_trait_selection::infer::InferCtxtBuilderExt;
1111
use rustc_trait_selection::traits::query::dropck_outlives::{
1212
compute_dropck_outlives_inner, dtorck_constraint_for_ty_inner,

0 commit comments

Comments
 (0)