Skip to content

Commit bd2c522

Browse files
committed
Checks for identifier after keyword for in impl
gcc/rust/ChangeLog: * parse/rust-parse-impl.h (Parser::parse_impl):after FOR checks for IDENTIFIER at parse_impl Signed-off-by: Lúcio Boari Fleury <[email protected]>
1 parent f942905 commit bd2c522

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

gcc/rust/parse/rust-parse-impl.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5418,7 +5418,7 @@ Parser<ManagedTokenSource>::parse_impl (AST::Visibility vis,
54185418
else
54195419
{
54205420
// type path must both be valid and next token is for, so trait impl
5421-
if (!skip_token (FOR))
5421+
if (!skip_token (FOR) || !skip_token (IDENTIFIER))
54225422
{
54235423
skip_after_next_block ();
54245424
return nullptr;

0 commit comments

Comments
 (0)