Skip to content

Commit defc7e9

Browse files
committed
Remove slice hack from lowering module
Fixes #49953.
1 parent 32a0a76 commit defc7e9

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/librustc_traits/lowering.rs

+1-3
Original file line numberDiff line numberDiff line change
@@ -234,10 +234,8 @@ fn program_clauses_for_trait<'a, 'tcx>(
234234
// ```
235235

236236
// `FromEnv(WC) :- FromEnv(Self: Trait<P1..Pn>)`, for each where clause WC
237-
// FIXME: Remove the [1..] slice; this is a hack because the query
238-
// predicates_of currently includes the trait itself (`Self: Trait<P1..Pn>`).
239237
let where_clauses = &tcx.predicates_of(def_id).predicates;
240-
let implied_bound_clauses = where_clauses[1..]
238+
let implied_bound_clauses = where_clauses
241239
.into_iter()
242240
.map(|wc| implied_bound_from_trait(tcx, trait_pred, wc));
243241

0 commit comments

Comments
 (0)