gnu/gcc/46ff959633430ba511b6610be084b85cf06e8f1d gccrs: attr: Register rustc_conversion_suggestion
This patch registers the 'rustc_conversion_suggestion' attribute. This
attribute is needed for compiling the alloc crate, so we register it as
a stub and the compiler will emit a warning when it encounters this
attribute.
gcc/rust/ChangeLog:
* checks/errors/rust-builtin-attribute-checker.cc
(attribute_checking_handlers): Add rustc_conversion_suggestion
attribute to map.
(check_valid_attribute_for_item): Add warning for new attribute.
* util/rust-attribute-values.h (class Attributes): Add
RUSTC_CONVERSION_SUGGESTION constexpr.
* util/rust-attributes.cc (__definitions): Add
BuiltinAttrDefinition for new attribute.
gcc/testsuite/ChangeLog:
* rust/compile/rustc_conversion_suggestion.rs: New test.
Signed-off-by: Enes Cevik <enes@nsvke.com>
4 files changed