]> git.ipfire.org Git - thirdparty/gcc.git/commit
gccrs: Reject auto traits with generic parameters
authorPierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
Mon, 20 Nov 2023 12:43:48 +0000 (13:43 +0100)
committerArthur Cohen <arthur.cohen@embecosm.com>
Tue, 30 Jan 2024 11:36:43 +0000 (12:36 +0100)
commitb1b744fc467a3cee4af0f85a8d8fb2b68f68b2d3
tree7d784bdd17a8b114b60e5e9dac93ac437be3ebd6
parent478ac287e75da1a3dffda6595051850a1c929f3c
gccrs: Reject auto traits with generic parameters

Generic parameters are not allowed on auto traits, the compiler should
emit an error.

gcc/rust/ChangeLog:

* checks/errors/rust-ast-validation.cc (ASTValidation::visit): Add
check for generics on auto traits.
* checks/errors/rust-ast-validation.h: Add visit function prototype.

Signed-off-by: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
gcc/rust/checks/errors/rust-ast-validation.cc
gcc/rust/checks/errors/rust-ast-validation.h