From: "lenny.chiadmi-delage" <[email protected]>

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]>
---
 gcc/rust/hir/rust-ast-lower-expr.cc | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gcc/rust/hir/rust-ast-lower-expr.cc 
b/gcc/rust/hir/rust-ast-lower-expr.cc
index d76811855f6..47f98f3ad65 100644
--- a/gcc/rust/hir/rust-ast-lower-expr.cc
+++ b/gcc/rust/hir/rust-ast-lower-expr.cc
@@ -192,8 +192,8 @@ ASTLoweringExpr::visit (AST::QualifiedPathInExpression 
&expr)
 void
 ASTLoweringExpr::visit (AST::BoxExpr &expr)
 {
-  // Not implemented
-  rust_unreachable ();
+  rust_sorry_at (expr.get_locus (),
+                "box expression syntax is not supported yet");
 }
 
 void
-- 
2.50.1

Reply via email to