]> git.ipfire.org Git - thirdparty/gcc.git/commit
Parse normal functions with `self` parameter correctly
authorKushal Pal <kushalpal109@gmail.com>
Tue, 23 Jan 2024 11:53:05 +0000 (17:23 +0530)
committerCohenArthur <arthur.cohen@embecosm.com>
Fri, 26 Jan 2024 10:11:04 +0000 (10:11 +0000)
commitbef49670f6248e30ab888ecdbd52a8a1612e25ef
tree769cbf9516ce10d8c15c918c243400ba9eeb0eec
parent396565b34006f8b26bf9b8ea34a837bceb02c70b
Parse normal functions with `self` parameter correctly

Fixes #2812

gcc/rust/ChangeLog:

* parse/rust-parse-impl.h (Parser::parse_function):
Skip token if its a COMMA.

gcc/testsuite/ChangeLog:

* rust/compile/issue-2812.rs: New test.

Signed-off-by: Kushal Pal <kushalpal109@gmail.com>
gcc/rust/parse/rust-parse-impl.h
gcc/testsuite/rust/compile/issue-2812.rs [new file with mode: 0644]