diff --git a/gcc/rust/parse/rust-parse-impl.h b/gcc/rust/parse/rust-parse-impl.h index f59b2c312a2..30aa03de5f4 100644 --- a/gcc/rust/parse/rust-parse-impl.h +++ b/gcc/rust/parse/rust-parse-impl.h @@ -10441,7 +10441,7 @@ Parser::parse_pattern () { lexer.skip_token (); alts.push_back (parse_pattern_no_alt ()); - } + } while (lexer.peek_token ()->get_id () == PIPE);