diff options
author | Philip Herron <philip.herron@embecosm.com> | 2021-10-20 16:31:50 +0100 |
---|---|---|
committer | Philip Herron <philip.herron@embecosm.com> | 2021-10-22 10:49:22 +0100 |
commit | e9b10b3d2992eeb360527c103f1bf9a455f2a593 (patch) | |
tree | dd4742734bf3e034c16326e3813aed8305030768 /gcc | |
parent | 3f67bb999b5e4457f434844cb16a21d6fc5694e1 (diff) | |
download | gcc-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.h | 2 |
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"); |