Commit 33d0494
gccrs: fix ICE on missing pattern in while loop
Adds a proper check for missing patterns in while expressions.
Fixes #4162
gcc/rust/ChangeLog:
* parse/rust-parse-impl.h(Parser<ManagedTokenSource>::parse_while_let_loop_expr):
Add check for missing pattern.
gcc/testsuite/ChangeLog:
* rust/compile/issue-4162.rs: New test.
Signed-off-by: Lucas Ly Ba <lucas.ly-ba@outlook.com>1 parent 95e08b8 commit 33d0494
File tree
2 files changed
+17
-1
lines changed- gcc
- rust/parse
- testsuite/rust/compile
2 files changed
+17
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8234 | 8234 | | |
8235 | 8235 | | |
8236 | 8236 | | |
8237 | | - | |
| 8237 | + | |
| 8238 | + | |
| 8239 | + | |
| 8240 | + | |
| 8241 | + | |
| 8242 | + | |
| 8243 | + | |
| 8244 | + | |
8238 | 8245 | | |
8239 | 8246 | | |
8240 | 8247 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
0 commit comments