[gcc r14-7902] gccrs: [E0282] type annotations needed

Arthur Cohen cohenarthur@gcc.gnu.org
Tue Jan 16 18:05:52 GMT 2024


https://gcc.gnu.org/g:f26df74ce3c20a391bb1e23aded851f971bca585

commit r14-7902-gf26df74ce3c20a391bb1e23aded851f971bca585
Author: Muhammad Mahad <mahadtxt@gmail.com>
Date:   Sat Aug 5 11:27:19 2023 +0500

    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>

Diff:
---
 gcc/rust/typecheck/rust-hir-type-check.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/rust/typecheck/rust-hir-type-check.cc b/gcc/rust/typecheck/rust-hir-type-check.cc
index 4e6d4578d07..c8e223d56dd 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;
       }


More information about the Gcc-cvs mailing list