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> {
48864886 bounds. push ( RegionTyParamBound ( self . expect_lifetime ( ) ) ) ;
48874887 if has_parens {
48884888 self . expect ( & token:: CloseDelim ( token:: Paren ) ) ?;
4889+ self . span_err ( self . prev_span ,
4890+ "parenthesized lifetime bounds are not supported" ) ;
48894891 }
48904892 } else {
48914893 let lifetime_defs = self . parse_late_bound_lifetime_defs ( ) ?;
@@ -4901,12 +4903,6 @@ impl<'a> Parser<'a> {
49014903 } ;
49024904 bounds. push ( TraitTyParamBound ( poly_trait, modifier) ) ;
49034905 }
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- }
49104906 } else {
49114907 break
49124908 }
You can’t perform that action at this time.
0 commit comments