diff options
author | Philip Herron <philip.herron@embecosm.com> | 2022-02-24 15:43:00 +0000 |
---|---|---|
committer | Philip Herron <philip.herron@embecosm.com> | 2022-02-24 15:43:00 +0000 |
commit | 7d6579c2fada550ad31d69f740597947f1f42d44 (patch) | |
tree | 07032d9b644d954fb60c5cd6f9af957fec744c3a /gcc | |
parent | 2975f114360d92588864a11fb896eed3bb4a0dcf (diff) | |
download | gcc-7d6579c2fada550ad31d69f740597947f1f42d44.zip gcc-7d6579c2fada550ad31d69f740597947f1f42d44.tar.gz gcc-7d6579c2fada550ad31d69f740597947f1f42d44.tar.bz2 |
Fix ICE as infered is nullptr at this point
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/rust/typecheck/rust-hir-type-check-expr.cc | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/gcc/rust/typecheck/rust-hir-type-check-expr.cc b/gcc/rust/typecheck/rust-hir-type-check-expr.cc index bd05c28..66d5e8d 100644 --- a/gcc/rust/typecheck/rust-hir-type-check-expr.cc +++ b/gcc/rust/typecheck/rust-hir-type-check-expr.cc @@ -280,8 +280,7 @@ TypeCheckExpr::visit (HIR::ArrayIndexExpr &expr) { rust_error_at (expr.get_index_expr ()->get_locus (), "expected an ArrayType got [%s]", - infered->as_string ().c_str ()); - infered = nullptr; + array_expr_ty->as_string ().c_str ()); return; } |