]> git.ipfire.org Git - thirdparty/gcc.git/commit
gccrs: proc macro: Detect malformed proc_macro_derive
authorPierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
Tue, 18 Jul 2023 11:37:03 +0000 (13:37 +0200)
committerArthur Cohen <arthur.cohen@embecosm.com>
Tue, 16 Jan 2024 17:55:57 +0000 (18:55 +0100)
commit1b1f8d898857b69b98095fc26b4dd95bafffdc18
treee21530e2ea616c76b84d0674f29278650347a9cf
parent6bed91c311e0fbfc72ad4de605335900fc98a5e6
gccrs: proc macro: Detect malformed proc_macro_derive

A derive procedural macro declaration shall always have at least a trait
to refer to. We should error out when it doesn't.

gcc/rust/ChangeLog:

* util/rust-attributes.cc (AttributeChecker::visit): Add
attribute input check.

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