File tree Expand file tree Collapse file tree
compiler/rustc_ast_lowering/src/delegation Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -147,13 +147,11 @@ impl<'hir> LoweringContext<'_, 'hir> {
147147 // FIXME(fn_delegation): proper support for late bound lifetimes.
148148 self . arena . alloc ( hir:: Generics {
149149 params,
150- predicates : self . arena . alloc_from_iter ( params. iter ( ) . filter_map ( |p| {
151- if matches ! ( p. kind, hir:: GenericParamKind :: Lifetime { .. } ) {
152- Some ( self . generate_lifetime_predicate ( p) )
153- } else {
154- None
155- }
156- } ) ) ,
150+ predicates : self . arena . alloc_from_iter (
151+ params
152+ . iter ( )
153+ . filter_map ( |p| p. is_lifetime ( ) . then ( || self . generate_lifetime_predicate ( p) ) ) ,
154+ ) ,
157155 has_where_clause_predicates : false ,
158156 where_clause_span : span,
159157 span,
@@ -258,7 +256,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
258256 }
259257 }
260258 } ) ) ,
261- constraints : self . arena . alloc_slice ( & [ ] ) ,
259+ constraints : & [ ] ,
262260 parenthesized : hir:: GenericArgsParentheses :: No ,
263261 span_ext : DUMMY_SP ,
264262 } )
You can’t perform that action at this time.
0 commit comments