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]>
---
This change was merged into the gccrs repository and is posted here for
upstream visibility and potential drive-by review, as requested by GCC
release managers.
Each commit email contains a link to its details on github from where you can
find the Pull-Request and associated discussions.


Commit on github: 
https://github.com/Rust-GCC/gccrs/commit/fccde896e5c095449d1df0594d82ffa3b95798d8

The commit has been mentioned in the following pull-request(s):
 - https://github.com/Rust-GCC/gccrs/pull/4391

 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 d76811855..47f98f3ad 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

base-commit: b625de4e6ccd4940688d2b1f6d352b45fdab570d
-- 
2.52.0

Reply via email to