diff options
author | Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com> | 2023-07-21 12:41:12 +0200 |
---|---|---|
committer | CohenArthur <arthur.cohen@embecosm.com> | 2023-07-27 09:40:30 +0000 |
commit | dc9eaa15e986ed104f3416014b1d0cdd97896960 (patch) | |
tree | 678f73464a0e96b74d18b67d61abc3ed336044eb /gcc/rust/resolve/rust-ast-resolve-expr.cc | |
parent | 18837b84b58b81fb749ce1e7f8a59bf19787fbd8 (diff) | |
download | gcc-dc9eaa15e986ed104f3416014b1d0cdd97896960.zip gcc-dc9eaa15e986ed104f3416014b1d0cdd97896960.tar.gz gcc-dc9eaa15e986ed104f3416014b1d0cdd97896960.tar.bz2 |
Emit error with proc macro on non functions
An error should be emitted when a proc_macro, proc_macro_attribute or
proc_macro_derive attribute is met on any non function item. Those
attribute shall be placed only on bare functions.
gcc/rust/ChangeLog:
* util/rust-attributes.cc (is_proc_macro_type): Add function to
identify matching proc macro attribute type.
(check_proc_macro_non_function): Add function to check and emit
error.
(AttributeChecker::visit): Add cal to new check function.
Signed-off-by: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
Diffstat (limited to 'gcc/rust/resolve/rust-ast-resolve-expr.cc')
0 files changed, 0 insertions, 0 deletions