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/backend/rust-compile-base.h | |
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/backend/rust-compile-base.h')
-rw-r--r-- | gcc/rust/backend/rust-compile-base.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/rust/backend/rust-compile-base.h b/gcc/rust/backend/rust-compile-base.h index b434168..c30aa4d 100644 --- a/gcc/rust/backend/rust-compile-base.h +++ b/gcc/rust/backend/rust-compile-base.h @@ -79,6 +79,9 @@ protected: static void handle_inline_attribute_on_fndecl (tree fndecl, const AST::Attribute &attr); + static void handle_must_use_attribute_on_fndecl (tree fndecl, + const AST::Attribute &attr); + static void setup_abi_options (tree fndecl, ABI abi); static tree address_expression (tree, Location); |