Remove incorrect assertion in type parsing code

This commit is contained in:
Fabian Wolff 2021-06-04 19:48:24 +02:00
parent c4c2ab57a4
commit 4e219e6335
5 changed files with 62 additions and 1 deletions

View file

@ -334,7 +334,6 @@ impl<'a> Parser<'a> {
mut bounds: GenericBounds,
plus: bool,
) -> PResult<'a, TyKind> {
assert_ne!(self.token, token::Question);
if plus {
self.eat_plus(); // `+`, or `+=` gets split and `+` is discarded
bounds.append(&mut self.parse_generic_bounds(Some(self.prev_token.span))?);