]> git.ipfire.org Git - thirdparty/gcc.git/commit
gccrs: Check proc_macro attributes on non root functions
authorPierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
Wed, 26 Jul 2023 10:16:12 +0000 (12:16 +0200)
committerArthur Cohen <arthur.cohen@embecosm.com>
Tue, 16 Jan 2024 17:56:02 +0000 (18:56 +0100)
commitb05d874fc527f81c54b50e62f204eb8cd04250d8
treef023f9e38fa398d49c0ca9182b952d4e8e3f99ec
parent96e4e5d27ec49416148b9a22a6c9bb050d562401
gccrs: Check proc_macro attributes on non root functions

Check proc_macro, proc_macro_attribute and proc_macro_derive attributes
on non root functions, emit an error when one is found.

gcc/rust/ChangeLog:

* util/rust-attributes.cc (check_proc_macro_non_root): Add
function to emit this specific error.
(AttributeChecker::visit): Modify visitor to propagate to some
containers that were not handled correctly.

Signed-off-by: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
gcc/rust/util/rust-attributes.cc