From: Muhammad Mahad Date: Wed, 5 Jul 2023 08:44:17 +0000 (+0500) Subject: gccrs: [E0053] method 'x' has an incompatible type for trait 'y' X-Git-Tag: basepoints/gcc-15~2400 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2a53f37997ea9d11e9d25d989d254d53614a883b;p=thirdparty%2Fgcc.git 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 --- 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 ());