aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust
diff options
context:
space:
mode:
authorPhilip Herron <philip.herron@embecosm.com>2021-04-15 14:59:04 +0100
committerPhilip Herron <philip.herron@embecosm.com>2021-04-17 16:45:43 +0100
commit01486c14135646ea011dfa2c3a1dfbf59abbe436 (patch)
tree6f78ef05ebc4c7a4cd453c21043c33fb11d5e139 /gcc/rust
parented651fcdec170456f7460703edbd0ca5901f0026 (diff)
downloadgcc-01486c14135646ea011dfa2c3a1dfbf59abbe436.zip
gcc-01486c14135646ea011dfa2c3a1dfbf59abbe436.tar.gz
gcc-01486c14135646ea011dfa2c3a1dfbf59abbe436.tar.bz2
Remove fatal error
This fatal error stops the compiler in its tracks and will mean the Typed HIR dump will not occur limiting how much we can debug errors/bugs in the compiler. Fixes #327
Diffstat (limited to 'gcc/rust')
-rw-r--r--gcc/rust/typecheck/rust-hir-type-check-expr.h6
-rw-r--r--gcc/rust/typecheck/rust-hir-type-check-stmt.h6
2 files changed, 2 insertions, 10 deletions
diff --git a/gcc/rust/typecheck/rust-hir-type-check-expr.h b/gcc/rust/typecheck/rust-hir-type-check-expr.h
index bdc6df3..6b6eed0 100644
--- a/gcc/rust/typecheck/rust-hir-type-check-expr.h
+++ b/gcc/rust/typecheck/rust-hir-type-check-expr.h
@@ -290,11 +290,7 @@ public:
auto result = lhs->unify (rhs);
if (result->get_kind () == TyTy::TypeKind::ERROR)
- {
- rust_error_at (expr.get_locus (),
- "type resolution failure in AssignmentExpr");
- return;
- }
+ return;
// in the case of declare first for an ADT Type:
//
diff --git a/gcc/rust/typecheck/rust-hir-type-check-stmt.h b/gcc/rust/typecheck/rust-hir-type-check-stmt.h
index e52368a..e0e7adc 100644
--- a/gcc/rust/typecheck/rust-hir-type-check-stmt.h
+++ b/gcc/rust/typecheck/rust-hir-type-check-stmt.h
@@ -76,11 +76,7 @@ public:
{
auto unified_ty = specified_ty->unify (init_expr_ty);
if (unified_ty->get_kind () == TyTy::TypeKind::ERROR)
- {
- rust_fatal_error (stmt.get_locus (),
- "failure in setting up let stmt type");
- return;
- }
+ return;
context->insert_type (stmt.get_mappings (), unified_ty);
}