We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 78a19d9 commit 699be41Copy full SHA for 699be41
src/libsyntax/parse/parser.rs
@@ -4886,6 +4886,8 @@ impl<'a> Parser<'a> {
4886
bounds.push(RegionTyParamBound(self.expect_lifetime()));
4887
if has_parens {
4888
self.expect(&token::CloseDelim(token::Paren))?;
4889
+ self.span_err(self.prev_span,
4890
+ "parenthesized lifetime bounds are not supported");
4891
}
4892
} else {
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));
4905
- if has_parens {
- if let Some(&RegionTyParamBound(..)) = bounds.last() {
4906
- self.span_err(self.prev_span,
4907
- "parenthesized lifetime bounds are not supported");
4908
- }
4909
4910
4911
break
4912
0 commit comments