]> git.ipfire.org Git - thirdparty/gcc.git/commit
Add AST validation check for const in trait
authorPierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
Wed, 22 Nov 2023 12:08:13 +0000 (13:08 +0100)
committerP-E-P <32375388+P-E-P@users.noreply.github.com>
Fri, 1 Dec 2023 09:26:43 +0000 (09:26 +0000)
commit0ff1dcb34369eda9b0b6ae3888c77ec79f444b63
treed79981052aedfb85bdf62a06e241f25e8fe9f5d8
parent5210b2b07cc42b6f090ca981484ab164f7abf287
Add AST validation check for const in trait

Add a new check in AST validation pass that checks that no function
declaration in traits are declared const.

gcc/rust/ChangeLog:

* checks/errors/rust-ast-validation.cc (ASTValidation::visit): Add
const check.
* 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