aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/hir/tree/rust-hir.cc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/rust/hir/tree/rust-hir.cc')
-rw-r--r--gcc/rust/hir/tree/rust-hir.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/rust/hir/tree/rust-hir.cc b/gcc/rust/hir/tree/rust-hir.cc
index dc94fb5..a802e8c 100644
--- a/gcc/rust/hir/tree/rust-hir.cc
+++ b/gcc/rust/hir/tree/rust-hir.cc
@@ -1055,7 +1055,10 @@ AnonConst::as_string () const
std::string istr = indent_spaces (enter);
std::string str = istr + "AnonConst:\n" + istr;
- str += get_inner_expr ().as_string ();
+ if (expr.has_value ())
+ str += get_inner_expr ().as_string ();
+ else
+ str += "_";
str += "\n" + indent_spaces (out);