File tree Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Original file line number Diff line number Diff line change @@ -4886,6 +4886,8 @@ impl<'a> Parser<'a> {
4886
4886
bounds. push ( RegionTyParamBound ( self . expect_lifetime ( ) ) ) ;
4887
4887
if has_parens {
4888
4888
self . expect ( & token:: CloseDelim ( token:: Paren ) ) ?;
4889
+ self . span_err ( self . prev_span ,
4890
+ "parenthesized lifetime bounds are not supported" ) ;
4889
4891
}
4890
4892
} else {
4891
4893
let lifetime_defs = self . parse_late_bound_lifetime_defs ( ) ?;
@@ -4901,12 +4903,6 @@ impl<'a> Parser<'a> {
4901
4903
} ;
4902
4904
bounds. push ( TraitTyParamBound ( poly_trait, modifier) ) ;
4903
4905
}
4904
- if has_parens {
4905
- if let Some ( & RegionTyParamBound ( ..) ) = bounds. last ( ) {
4906
- self . span_err ( self . prev_span ,
4907
- "parenthesized lifetime bounds are not supported" ) ;
4908
- }
4909
- }
4910
4906
} else {
4911
4907
break
4912
4908
}
You can’t perform that action at this time.
0 commit comments