Skip to content

Commit

Permalink
Permit empty trait bounds after colon on type item
Browse files Browse the repository at this point in the history
  • Loading branch information
dtolnay committed Mar 9, 2021
1 parent e39fca3 commit 79e357c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/item.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1179,14 +1179,14 @@ pub mod parsing {
let mut bounds = Punctuated::new();
if colon_token.is_some() {
loop {
bounds.push_value(input.parse::<TypeParamBound>()?);
if input.peek(Token![where]) || input.peek(Token![=]) || input.peek(Token![;]) {
break;
}
bounds.push_punct(input.parse::<Token![+]>()?);
bounds.push_value(input.parse::<TypeParamBound>()?);
if input.peek(Token![where]) || input.peek(Token![=]) || input.peek(Token![;]) {
break;
}
bounds.push_punct(input.parse::<Token![+]>()?);
}
}
generics.where_clause = input.parse()?;
Expand Down

0 comments on commit 79e357c

Please sign in to comment.