Skip to content

Commit

Permalink
Merge pull request #1078 from dtolnay/trailingplus
Browse files Browse the repository at this point in the history
Invert TypeTraitObject exit condition to match TypeImplTrait
  • Loading branch information
dtolnay committed Oct 6, 2021
2 parents 45e6edb + e630c9c commit 97598d1
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/ty.rs
Original file line number Diff line number Diff line change
Expand Up @@ -885,7 +885,12 @@ pub mod parsing {
break;
}
bounds.push_punct(input.parse()?);
if input.peek(Token![>]) || input.is_empty() {
if !(input.peek(Ident::peek_any)
|| input.peek(Token![::])
|| input.peek(Token![?])
|| input.peek(Lifetime)
|| input.peek(token::Paren))
{
break;
}
}
Expand Down

0 comments on commit 97598d1

Please sign in to comment.