]> git.ipfire.org Git - thirdparty/gcc.git/commit
gccrs: add diagnostic for E0229 no associated type arguments allowed here
authorPhilip Herron <herron.philip@googlemail.com>
Wed, 12 Feb 2025 17:10:31 +0000 (17:10 +0000)
committerArthur Cohen <arthur.cohen@embecosm.com>
Mon, 24 Mar 2025 12:07:05 +0000 (13:07 +0100)
commitc5b8c95b82ceb961dcd8a14072c8a1ed0025a043
tree99c9778f2eff1179be1ca8676ee3fc51dee095ee
parentdd0a895a5558ce37f9f813aca696f7b18678dd99
gccrs: add diagnostic for E0229 no associated type arguments allowed here

It seems bounds in qualified paths are not allowed to specify associated
type bindings because its going to be associated with the impl block
anyway.

Fixes Rust-GCC#2369

gcc/rust/ChangeLog:

* typecheck/rust-hir-type-check-base.h: add flag
* typecheck/rust-hir-type-check-type.cc (TypeCheckType::visit): likewise
* typecheck/rust-tyty-bounds.cc: new diagnostic

gcc/testsuite/ChangeLog:

* rust/compile/issue-2369.rs: New test.

Signed-off-by: Philip Herron <herron.philip@googlemail.com>
gcc/rust/typecheck/rust-hir-type-check-base.h
gcc/rust/typecheck/rust-hir-type-check-type.cc
gcc/rust/typecheck/rust-tyty-bounds.cc
gcc/testsuite/rust/compile/issue-2369.rs [new file with mode: 0644]