From 2a53f37997ea9d11e9d25d989d254d53614a883b Mon Sep 17 00:00:00 2001 From: Muhammad Mahad Date: Wed, 5 Jul 2023 13:44:17 +0500 Subject: [PATCH] gccrs: [E0053] method 'x' has an incompatible type for trait 'y' The parameters of any trait method must match between a trait implementation and the trait definition gcc/rust/ChangeLog: * typecheck/rust-hir-type-check-implitem.cc (TypeCheckImplItemWithTrait::visit): called error function Signed-off-by: Muhammad Mahad --- gcc/rust/typecheck/rust-hir-type-check-implitem.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/rust/typecheck/rust-hir-type-check-implitem.cc b/gcc/rust/typecheck/rust-hir-type-check-implitem.cc index aeca121981c2..6c1a07787c6d 100644 --- a/gcc/rust/typecheck/rust-hir-type-check-implitem.cc +++ b/gcc/rust/typecheck/rust-hir-type-check-implitem.cc @@ -529,7 +529,7 @@ TypeCheckImplItemWithTrait::visit (HIR::Function &function) RichLocation r (function.get_locus ()); r.add_range (resolved_trait_item.get_locus ()); - rust_error_at (r, + rust_error_at (r, ErrorCode ("E0053"), "method %<%s%> has an incompatible type for trait %<%s%>", function.get_function_name ().as_string ().c_str (), trait_reference.get_name ().c_str ()); -- 2.47.2