forked from Rust-GCC/gccrs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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 <[email protected]>
- Loading branch information
1 parent
ede65c2
commit dae69e8
Showing
6 changed files
with
26 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters