Skip to content

Commit 280d193

Browse files
committed
Remove projection_ty_from_predicates
1 parent 52b2286 commit 280d193

File tree

3 files changed

+1
-29
lines changed

3 files changed

+1
-29
lines changed

compiler/rustc_middle/src/dep_graph/dep_node.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ pub type DepNode = rustc_query_system::dep_graph::DepNode<DepKind>;
285285
// required that their size stay the same, but we don't want to change
286286
// it inadvertently. This assert just ensures we're aware of any change.
287287
#[cfg(any(target_arch = "x86", target_arch = "x86_64"))]
288-
static_assert_size!(DepNode, 18);
288+
static_assert_size!(DepNode, 17);
289289

290290
#[cfg(not(any(target_arch = "x86", target_arch = "x86_64")))]
291291
static_assert_size!(DepNode, 24);

compiler/rustc_middle/src/query/mod.rs

-4
Original file line numberDiff line numberDiff line change
@@ -191,10 +191,6 @@ rustc_queries! {
191191
desc { |tcx| "elaborating item bounds for `{}`", tcx.def_path_str(key) }
192192
}
193193

194-
query projection_ty_from_predicates(key: (DefId, DefId)) -> Option<ty::ProjectionTy<'tcx>> {
195-
desc { |tcx| "finding projection type inside predicates of `{}`", tcx.def_path_str(key.0) }
196-
}
197-
198194
query native_libraries(_: CrateNum) -> Lrc<Vec<NativeLib>> {
199195
desc { "looking up the native libraries of a linked crate" }
200196
}

compiler/rustc_typeck/src/collect.rs

-24
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,6 @@ pub fn provide(providers: &mut Providers) {
7777
generics_of,
7878
predicates_of,
7979
predicates_defined_on,
80-
projection_ty_from_predicates,
8180
explicit_predicates_of,
8281
super_predicates_of,
8382
super_predicates_that_define_assoc_type,
@@ -2352,29 +2351,6 @@ fn explicit_predicates_of(tcx: TyCtxt<'_>, def_id: DefId) -> ty::GenericPredicat
23522351
}
23532352
}
23542353

2355-
fn projection_ty_from_predicates(
2356-
tcx: TyCtxt<'tcx>,
2357-
key: (
2358-
// ty_def_id
2359-
DefId,
2360-
// def_id of `N` in `<T as Trait>::N`
2361-
DefId,
2362-
),
2363-
) -> Option<ty::ProjectionTy<'tcx>> {
2364-
let (ty_def_id, item_def_id) = key;
2365-
let mut projection_ty = None;
2366-
for (predicate, _) in tcx.predicates_of(ty_def_id).predicates {
2367-
if let ty::PredicateKind::Projection(projection_predicate) = predicate.kind().skip_binder()
2368-
{
2369-
if item_def_id == projection_predicate.projection_ty.item_def_id {
2370-
projection_ty = Some(projection_predicate.projection_ty);
2371-
break;
2372-
}
2373-
}
2374-
}
2375-
projection_ty
2376-
}
2377-
23782354
/// Converts a specific `GenericBound` from the AST into a set of
23792355
/// predicates that apply to the self type. A vector is returned
23802356
/// because this can be anywhere from zero predicates (`T: ?Sized` adds no

0 commit comments

Comments
 (0)