From: Muhammad Mahad Date: Mon, 3 Jul 2023 16:08:33 +0000 (+0500) Subject: gccrs: [E0229] associated type bindings error X-Git-Tag: basepoints/gcc-15~2409 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c34f50643daca821f470677ef0c0fb095f0c3165;p=thirdparty%2Fgcc.git gccrs: [E0229] associated type bindings error Associated type binding outside of type parameter Declaration and where Clause gcc/rust/ChangeLog: * typecheck/rust-tyty-subst.cc (SubstitutionRef::get_mappings_from_generic_args): called error function Signed-off-by: Muhammad Mahad --- diff --git a/gcc/rust/typecheck/rust-tyty-subst.cc b/gcc/rust/typecheck/rust-tyty-subst.cc index 252b292f60e7..9c5c76dd8d22 100644 --- a/gcc/rust/typecheck/rust-tyty-subst.cc +++ b/gcc/rust/typecheck/rust-tyty-subst.cc @@ -606,7 +606,8 @@ SubstitutionRef::get_mappings_from_generic_args (HIR::GenericArgs &args) for (auto &binding : args.get_binding_args ()) r.add_range (binding.get_locus ()); - rust_error_at (r, "associated type bindings are not allowed here"); + rust_error_at (r, ErrorCode ("E0229"), + "associated type bindings are not allowed here"); return SubstitutionArgumentMappings::error (); } }