keep bounds where they were

This commit is contained in:
Christian Poveda 2022-05-16 22:23:32 -05:00
parent 7e8517df61
commit 7cafefec4a
No known key found for this signature in database
GPG Key ID: 27525EF5E7420A50

View File

@ -1286,14 +1286,13 @@ pub(super) fn maybe_recover_from_bad_type_plus(
}
self.bump(); // `+`
let bounds = self.parse_generic_bounds(None)?;
let sum_span = ty.span.to(self.prev_token.span);
let sum_with_parens: String;
let sub = match ty.kind {
TyKind::Rptr(ref lifetime, ref mut_ty) => {
let bounds = self.parse_generic_bounds(None)?;
sum_with_parens = pprust::to_string(|s| {
s.s.word("&");
s.print_opt_lifetime(lifetime);