Skip to content

Commit fccde89

Browse files
VillosseP-E-P
authored andcommitted
gccrs: replace unreachable with sorry_at
Do not throw an ICE whit unimplemented `box`. gcc/rust/ChangeLog: * hir/rust-ast-lower-expr.cc (ASTLoweringExpr::visit): Replace unreachable with sorry_at. Signed-off-by: lenny.chiadmi-delage <[email protected]>
1 parent b625de4 commit fccde89

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

gcc/rust/hir/rust-ast-lower-expr.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -192,8 +192,8 @@ ASTLoweringExpr::visit (AST::QualifiedPathInExpression &expr)
192192
void
193193
ASTLoweringExpr::visit (AST::BoxExpr &expr)
194194
{
195-
// Not implemented
196-
rust_unreachable ();
195+
rust_sorry_at (expr.get_locus (),
196+
"box expression syntax is not supported yet");
197197
}
198198

199199
void

0 commit comments

Comments
 (0)