diff options
author | Philip Herron <philip.herron@embecosm.com> | 2022-03-03 09:23:06 +0000 |
---|---|---|
committer | Philip Herron <philip.herron@embecosm.com> | 2022-03-03 11:08:18 +0000 |
commit | d6e1771291c792f665f5b9ed7d065bf292051e6a (patch) | |
tree | d26c37ac592965fdb52caa73c41cd6e95ae322c8 /gcc/rust/util/rust-attributes.cc | |
parent | 57b50607988481238275d8a2f73722896cbe0fe2 (diff) | |
download | gcc-d6e1771291c792f665f5b9ed7d065bf292051e6a.zip gcc-d6e1771291c792f665f5b9ed7d065bf292051e6a.tar.gz gcc-d6e1771291c792f665f5b9ed7d065bf292051e6a.tar.bz2 |
must use attribute support
This ports over the code from the cpp front-end which implements the cpp
nodiscard attribute which has the same behaviour and is also implemented
in the front-end explicitly.
Fixes #856
Diffstat (limited to 'gcc/rust/util/rust-attributes.cc')
-rw-r--r-- | gcc/rust/util/rust-attributes.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/gcc/rust/util/rust-attributes.cc b/gcc/rust/util/rust-attributes.cc index 3809ad7..4f3bd0b 100644 --- a/gcc/rust/util/rust-attributes.cc +++ b/gcc/rust/util/rust-attributes.cc @@ -22,10 +22,10 @@ namespace Rust { namespace Analysis { // https://doc.rust-lang.org/stable/nightly-rustc/src/rustc_feature/builtin_attrs.rs.html#256 -static const BuiltinAttrDefinition __definitions[] = { - {"inline", CODE_GENERATION}, {"cfg", EXPANSION}, {"cfg_attr", EXPANSION}, - {"allow", STATIC_ANALYSIS}, {"lang", HIR_LOWERING}, -}; +static const BuiltinAttrDefinition __definitions[] + = {{"inline", CODE_GENERATION}, {"cfg", EXPANSION}, + {"cfg_attr", EXPANSION}, {"allow", STATIC_ANALYSIS}, + {"lang", HIR_LOWERING}, {"must_use", STATIC_ANALYSIS}}; BuiltinAttributeMappings * BuiltinAttributeMappings::get () |