]> git.ipfire.org Git - thirdparty/gcc.git/commit
gccrs: Add validation for functions without body
authorPierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
Wed, 22 Nov 2023 15:37:17 +0000 (16:37 +0100)
committerArthur Cohen <arthur.cohen@embecosm.com>
Tue, 30 Jan 2024 11:36:48 +0000 (12:36 +0100)
commit04fd5a043b08fdc4d4e60499b8fd83d02007a737
tree7b5aadd52f39ea315d2b1de96ed594bd89f9e8c5
parent7a989394795a740dd4bcabbba251428cc9df08f1
gccrs: Add validation for functions without body

Add checks in the ast validation pass to error out with functions
(either free or associated) without a definition.

gcc/rust/ChangeLog:

* checks/errors/rust-ast-validation.cc (ASTValidation::visit): Add
a validation check and emit an error depending on the context.

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