Skip to content

Commit 7cafefe

Browse files
committed
keep bounds where they were
1 parent 7e8517d commit 7cafefe

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

compiler/rustc_parse/src/parser/diagnostics.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -1286,14 +1286,13 @@ impl<'a> Parser<'a> {
12861286
}
12871287

12881288
self.bump(); // `+`
1289+
let bounds = self.parse_generic_bounds(None)?;
12891290
let sum_span = ty.span.to(self.prev_token.span);
12901291

12911292
let sum_with_parens: String;
12921293

12931294
let sub = match ty.kind {
12941295
TyKind::Rptr(ref lifetime, ref mut_ty) => {
1295-
let bounds = self.parse_generic_bounds(None)?;
1296-
12971296
sum_with_parens = pprust::to_string(|s| {
12981297
s.s.word("&");
12991298
s.print_opt_lifetime(lifetime);

0 commit comments

Comments
 (0)