aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/resolve/rust-ast-resolve.cc
diff options
context:
space:
mode:
authorOwen Avery <powerboat9.gamer@gmail.com>2024-02-27 16:34:23 -0500
committerCohenArthur <arthur.cohen@embecosm.com>2024-03-04 11:22:29 +0000
commitdae69e86c0feafd4e67bec2309c8e14b82f935ac (patch)
treec19c10d15ccd16767d4048ba4877df8a64a2253c /gcc/rust/resolve/rust-ast-resolve.cc
parentede65c2801c05b3c60f13b1f7fb434567fb97447 (diff)
downloadgcc-dae69e86c0feafd4e67bec2309c8e14b82f935ac.zip
gcc-dae69e86c0feafd4e67bec2309c8e14b82f935ac.tar.gz
gcc-dae69e86c0feafd4e67bec2309c8e14b82f935ac.tar.bz2
Ensure TupleStructPattern and TuplePattern have items
Note that instances of both classes which have been moved from will have (items == nullptr). gcc/rust/ChangeLog: * ast/rust-pattern.h (class TupleStructPattern): Assert that items != nullptr. (class TuplePattern): Likewise. (TupleStructPattern::has_items): Remove. (TuplePattern::has_tuple_pattern_items): Likewise. * parse/rust-parse-impl.h (Parser::parse_ident_leading_pattern): Prevent construction of TupleStructPattern with (items == nullptr). (Parser::parse_pattern_no_alt): Likewise. * ast/rust-ast-collector.cc (TokenCollector::visit): Remove usage of TupleStructPattern::has_items. * ast/rust-ast-visitor.cc (DefaultASTVisitor::visit): Likewise. * resolve/rust-early-name-resolver.cc (EarlyNameResolver::visit): Likewise. gcc/testsuite/ChangeLog: * rust/compile/pattern-struct.rs: Fix test. Signed-off-by: Owen Avery <powerboat9.gamer@gmail.com>
Diffstat (limited to 'gcc/rust/resolve/rust-ast-resolve.cc')
0 files changed, 0 insertions, 0 deletions