Move lifetimes before the *first* type argument
This commit is contained in:
parent
79ee8f329d
commit
234d043d18
@ -5229,7 +5229,9 @@ fn parse_trait_item_assoc_ty(&mut self)
|
||||
} else if self.check_ident() {
|
||||
// Parse type parameter.
|
||||
params.push(self.parse_ty_param(attrs)?);
|
||||
seen_ty_param = Some(self.prev_span);
|
||||
if seen_ty_param.is_none() {
|
||||
seen_ty_param = Some(self.prev_span);
|
||||
}
|
||||
} else {
|
||||
// Check for trailing attributes and stop parsing.
|
||||
if !attrs.is_empty() {
|
||||
|
@ -25,8 +25,8 @@ LL | struct C<T, U, 'a> {
|
||||
| ^^
|
||||
help: move the lifetime parameter prior to the first type parameter
|
||||
|
|
||||
LL | struct C<T, 'a, U> {
|
||||
| ^^^ --
|
||||
LL | struct C<'a, T, U> {
|
||||
| ^^^ --
|
||||
|
||||
error: aborting due to 3 previous errors
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user