aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMuhammad Mahad <mahadtxt@gmail.com>2023-08-05 11:27:19 +0500
committerP-E-P <32375388+P-E-P@users.noreply.github.com>2023-08-09 11:49:06 +0000
commita58485620d6bf6579a669b209410cb81915405a4 (patch)
treee8198dfb2e867110bcd9d4a889b99c8c2a513b5e
parent0d678b209df6a6ad6456ced2bd8c9aa0fa547b5f (diff)
downloadgcc-a58485620d6bf6579a669b209410cb81915405a4.zip
gcc-a58485620d6bf6579a669b209410cb81915405a4.tar.gz
gcc-a58485620d6bf6579a669b209410cb81915405a4.tar.bz2
gccrs: [E0282] type annotations needed
type must be known at compile time. gcc/rust/ChangeLog: * typecheck/rust-hir-type-check.cc (TypeResolution::Resolve): added errorcode. Signed-off-by: Muhammad Mahad <mahadtxt@gmail.com>
-rw-r--r--gcc/rust/typecheck/rust-hir-type-check.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/rust/typecheck/rust-hir-type-check.cc b/gcc/rust/typecheck/rust-hir-type-check.cc
index 0a0c2f1..9d4923e 100644
--- a/gcc/rust/typecheck/rust-hir-type-check.cc
+++ b/gcc/rust/typecheck/rust-hir-type-check.cc
@@ -57,7 +57,7 @@ TypeResolution::Resolve (HIR::Crate &crate)
bool ok = infer_var->default_type (&default_type);
if (!ok)
{
- rust_error_at (mappings->lookup_location (id),
+ rust_error_at (mappings->lookup_location (id), ErrorCode::E0282,
"type annotations needed");
return true;
}