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>
if (result.name == "proc_macro_derive")
{
+ if (!attribute.has_attr_input ())
+ {
+ rust_error_at (attribute.get_locus (),
+ "malformed %<%s%> attribute input", name);
+ }
check_crate_type (name, attribute);
}
else if (result.name == "proc_macro"