aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorPhilip Herron <philip.herron@embecosm.com>2021-10-20 16:31:50 +0100
committerPhilip Herron <philip.herron@embecosm.com>2021-10-22 10:49:22 +0100
commite9b10b3d2992eeb360527c103f1bf9a455f2a593 (patch)
treedd4742734bf3e034c16326e3813aed8305030768 /gcc
parent3f67bb999b5e4457f434844cb16a21d6fc5694e1 (diff)
downloadgcc-e9b10b3d2992eeb360527c103f1bf9a455f2a593.zip
gcc-e9b10b3d2992eeb360527c103f1bf9a455f2a593.tar.gz
gcc-e9b10b3d2992eeb360527c103f1bf9a455f2a593.tar.bz2
Error handling is done via the TyTy::ErrorType instead of nullptr's
Diffstat (limited to 'gcc')
-rw-r--r--gcc/rust/typecheck/rust-hir-type-check-toplevel.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/rust/typecheck/rust-hir-type-check-toplevel.h b/gcc/rust/typecheck/rust-hir-type-check-toplevel.h
index 131149f..be53a0d 100644
--- a/gcc/rust/typecheck/rust-hir-type-check-toplevel.h
+++ b/gcc/rust/typecheck/rust-hir-type-check-toplevel.h
@@ -266,7 +266,7 @@ public:
{
auto resolved
= TypeCheckType::Resolve (function.get_return_type ().get ());
- if (resolved == nullptr)
+ if (resolved->get_kind () == TyTy::TypeKind::ERROR)
{
rust_error_at (function.get_locus (),
"failed to resolve return type");