diff options
author | Jakub Dupak <dev@jakubdupak.com> | 2023-12-03 11:13:04 +0100 |
---|---|---|
committer | Arthur Cohen <arthur.cohen@embecosm.com> | 2024-01-30 12:36:49 +0100 |
commit | ed198edc9bfc17b4c2356068623aa31bda4e1ee7 (patch) | |
tree | 5e214cef530726e177140d2b1e50466154c9a64a | |
parent | cc9465332ebcabebb04b95549989d74a8f1c0ce6 (diff) | |
download | gcc-ed198edc9bfc17b4c2356068623aa31bda4e1ee7.zip gcc-ed198edc9bfc17b4c2356068623aa31bda4e1ee7.tar.gz gcc-ed198edc9bfc17b4c2356068623aa31bda4e1ee7.tar.bz2 |
gccrs: TyTy: Fix missed nodiscard
gcc/rust/ChangeLog:
* typecheck/rust-tyty.h: Fix nodiscard to warn unused.
Signed-off-by: Jakub Dupak <dev@jakubdupak.com>
-rw-r--r-- | gcc/rust/typecheck/rust-tyty.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/rust/typecheck/rust-tyty.h b/gcc/rust/typecheck/rust-tyty.h index 8bfa83d..da4b901 100644 --- a/gcc/rust/typecheck/rust-tyty.h +++ b/gcc/rust/typecheck/rust-tyty.h @@ -177,7 +177,7 @@ public: virtual BaseType *clone () const = 0; // Check if TyTy::BaseType is of a specific type. - template <typename T>[[nodiscard]] bool is () const + template <typename T> WARN_UNUSED_RESULT bool is () const { static_assert (std::is_base_of<BaseType, T>::value, "Can only safely cast to TyTy types."); |