From 79a4ae0548ce6059bf71f661031367a6c895b801 Mon Sep 17 00:00:00 2001 From: Jakub Dupak Date: Sun, 3 Dec 2023 11:13:04 +0100 Subject: [PATCH] TyTy: Fix missed nodiscard gcc/rust/ChangeLog: * typecheck/rust-tyty.h: Fix nodiscard to warn unused. Signed-off-by: Jakub Dupak --- gcc/rust/typecheck/rust-tyty.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/rust/typecheck/rust-tyty.h b/gcc/rust/typecheck/rust-tyty.h index 212ebc975704..2e188c2027c3 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 [[nodiscard]] bool is () const + template WARN_UNUSED_RESULT bool is () const { static_assert (std::is_base_of::value, "Can only safely cast to TyTy types."); -- 2.47.2