Skip to content

Commit e9587f8

Browse files
VillosseP-E-P
authored andcommitted
gccrs: fix ice on let else expession
added error handling for let else expression. Fixes #4375 gcc/rust/ChangeLog: * resolve/rust-late-name-resolver-2.0.cc (Late::visit): Visit else_expr if has_else_expr, not init_expr. Signed-off-by: lenny.chiadmi-delage <[email protected]>
1 parent 23de527 commit e9587f8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

gcc/rust/resolve/rust-late-name-resolver-2.0.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ Late::visit (AST::LetStmt &let)
119119
ctx.bindings.exit ();
120120

121121
if (let.has_else_expr ())
122-
visit (let.get_init_expr ());
122+
visit (let.get_else_expr ());
123123

124124
// how do we deal with the fact that `let a = blipbloup` should look for a
125125
// label and cannot go through function ribs, but `let a = blipbloup()` can?

0 commit comments

Comments
 (0)