diff options
| author | b-naber <bn263@gmx.de> | 2020-11-30 09:28:16 +0100 |
|---|---|---|
| committer | b-naber <bn263@gmx.de> | 2021-02-04 21:37:23 +0100 |
| commit | 9e920151a32bf2c33fc83dacbbc845aa3956f582 (patch) | |
| tree | 48db77d7ad353d468003fa3c28a2c66a86cf9956 | |
| parent | 6a68966663b8412d8f863e5c9dd161085d24d128 (diff) | |
| download | rust-9e920151a32bf2c33fc83dacbbc845aa3956f582.tar.gz rust-9e920151a32bf2c33fc83dacbbc845aa3956f582.zip | |
remove subst_supertrait call
| -rw-r--r-- | compiler/rustc_trait_selection/src/traits/object_safety.rs | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/compiler/rustc_trait_selection/src/traits/object_safety.rs b/compiler/rustc_trait_selection/src/traits/object_safety.rs index 3852005ee3f..e155f0366e1 100644 --- a/compiler/rustc_trait_selection/src/traits/object_safety.rs +++ b/compiler/rustc_trait_selection/src/traits/object_safety.rs @@ -257,13 +257,11 @@ fn predicates_reference_self( } fn bounds_reference_self(tcx: TyCtxt<'_>, trait_def_id: DefId) -> SmallVec<[Span; 1]> { - let trait_ref = ty::Binder::dummy(ty::TraitRef::identity(tcx, trait_def_id)); tcx.associated_items(trait_def_id) .in_definition_order() .filter(|item| item.kind == ty::AssocKind::Type) .flat_map(|item| tcx.explicit_item_bounds(item.def_id)) - .map(|&(predicate, sp)| (predicate.subst_supertrait(tcx, &trait_ref), sp)) - .filter_map(|predicate| predicate_references_self(tcx, predicate)) + .filter_map(|pred_span| predicate_references_self(tcx, *pred_span)) .collect() } |
