From: Muhammad Mahad Date: Sat, 5 Aug 2023 06:27:19 +0000 (+0500) Subject: gccrs: [E0282] type annotations needed X-Git-Tag: basepoints/gcc-15~2237 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f26df74ce3c20a391bb1e23aded851f971bca585;p=thirdparty%2Fgcc.git 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 --- diff --git a/gcc/rust/typecheck/rust-hir-type-check.cc b/gcc/rust/typecheck/rust-hir-type-check.cc index 4e6d4578d076..c8e223d56dd3 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; }