aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorMuhammad Mahad <mahadtxt@gmail.com>2023-07-05 13:44:17 +0500
committerArthur Cohen <arthur.cohen@embecosm.com>2024-01-16 18:49:32 +0100
commit2a53f37997ea9d11e9d25d989d254d53614a883b (patch)
tree03163056e899cdcc24701cfa664f96c95df35090 /gcc
parentefa319175a0d5a2aa2d859d8305be3bf881ad006 (diff)
downloadgcc-2a53f37997ea9d11e9d25d989d254d53614a883b.zip
gcc-2a53f37997ea9d11e9d25d989d254d53614a883b.tar.gz
gcc-2a53f37997ea9d11e9d25d989d254d53614a883b.tar.bz2
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 <mahadtxt@gmail.com>
Diffstat (limited to 'gcc')
-rw-r--r--gcc/rust/typecheck/rust-hir-type-check-implitem.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/rust/typecheck/rust-hir-type-check-implitem.cc b/gcc/rust/typecheck/rust-hir-type-check-implitem.cc
index aeca121..6c1a077 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 ());