diff --git a/gcc/rust/typecheck/rust-hir-type-check-item.cc b/gcc/rust/typecheck/rust-hir-type-check-item.cc index bb8a5eb362c8..889cd3218a42 100644 --- a/gcc/rust/typecheck/rust-hir-type-check-item.cc +++ b/gcc/rust/typecheck/rust-hir-type-check-item.cc @@ -659,7 +659,8 @@ TypeCheckItem::validate_trait_impl_block ( r.add_range (missing_trait_item.get_locus ()); } - rust_error_at (r, "missing %s in implementation of trait %<%s%>", + rust_error_at (r, ErrorCode ("E0046"), + "missing %s in implementation of trait %<%s%>", missing_items_buf.c_str (), trait_reference->get_name ().c_str ()); }