diff options
author | Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com> | 2023-07-21 12:41:12 +0200 |
---|---|---|
committer | Arthur Cohen <arthur.cohen@embecosm.com> | 2024-01-16 18:56:00 +0100 |
commit | cd90ba84e1725449c7ca0c3ff6ec4304c1504b9f (patch) | |
tree | cc4aa57a22f8caa6bed8f7763e8d23a128dbcae3 /gcc/rust/Make-lang.in | |
parent | 6050e07157ef915460a936452f29bd237f795e5f (diff) | |
download | gcc-cd90ba84e1725449c7ca0c3ff6ec4304c1504b9f.zip gcc-cd90ba84e1725449c7ca0c3ff6ec4304c1504b9f.tar.gz gcc-cd90ba84e1725449c7ca0c3ff6ec4304c1504b9f.tar.bz2 |
gccrs: 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/Make-lang.in')
0 files changed, 0 insertions, 0 deletions