aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/parse/rust-cfg-parser.cc
diff options
context:
space:
mode:
authorArthur Cohen <arthur.cohen@embecosm.com>2023-02-23 15:11:04 +0100
committerCohenArthur <arthur.cohen@embecosm.com>2023-02-27 09:52:33 +0000
commitce43f55e9976929f9ff2388c8971a65afd24e26d (patch)
tree6df3152421ed8f15efbffe46b957060dcba575cd /gcc/rust/parse/rust-cfg-parser.cc
parent0d4a4475e9fbd972bdbcf8e0bcf6f3be3db2f00f (diff)
downloadgcc-ce43f55e9976929f9ff2388c8971a65afd24e26d.zip
gcc-ce43f55e9976929f9ff2388c8971a65afd24e26d.tar.gz
gcc-ce43f55e9976929f9ff2388c8971a65afd24e26d.tar.bz2
parser: Parse `default` impl Functions and Methods
gcc/rust/ChangeLog: * ast/rust-item.h (class Method): Add `is_default` field. (class Function): Likewise. * parse/rust-parse-impl.h (Parser::parse_item): Add nice error when parsing `default` outside of an `impl` block (Parser::parse_trait_impl_item): Allow parsing functions or methods when seeing `default`. gcc/testsuite/ChangeLog: * rust/compile/parse_invalid_specialization.rs: New test. * rust/compile/parse_specialization.rs: New test. * rust/compile/default_not_a_kw.rs: New test.
Diffstat (limited to 'gcc/rust/parse/rust-cfg-parser.cc')
0 files changed, 0 insertions, 0 deletions