public inbox for gcc-cvs@sourceware.org help / color / mirror / Atom feed
From: Arthur Cohen <cohenarthur@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org Subject: [gcc r14-8598] gccrs: BIR: Fix missed nodiscard Date: Tue, 30 Jan 2024 12:00:37 +0000 (GMT) [thread overview] Message-ID: <20240130120037.A8BF23857BA4@sourceware.org> (raw) https://gcc.gnu.org/g:35d5f82eaeaa849997039586109b0b302a88148a commit r14-8598-g35d5f82eaeaa849997039586109b0b302a88148a Author: Jakub Dupak <dev@jakubdupak.com> Date: Mon Dec 11 21:52:48 2023 +0100 gccrs: BIR: Fix missed nodiscard gcc/rust/ChangeLog: * checks/errors/borrowck/rust-bir-builder-internal.h: Replace nodiscard. * checks/errors/borrowck/rust-bir-place.h: Replace nodiscard. Signed-off-by: Jakub Dupak <dev@jakubdupak.com> Diff: --- gcc/rust/checks/errors/borrowck/rust-bir-builder-internal.h | 4 ++-- gcc/rust/checks/errors/borrowck/rust-bir-place.h | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/gcc/rust/checks/errors/borrowck/rust-bir-builder-internal.h b/gcc/rust/checks/errors/borrowck/rust-bir-builder-internal.h index f33eb0752446..cd6115147766 100644 --- a/gcc/rust/checks/errors/borrowck/rust-bir-builder-internal.h +++ b/gcc/rust/checks/errors/borrowck/rust-bir-builder-internal.h @@ -261,12 +261,12 @@ protected: // CFG helpers protected: // HIR resolution helpers template <typename T> - [[nodiscard]] TyTy::BaseType *lookup_type (T &hir_node) const + WARN_UNUSED_RESULT TyTy::BaseType *lookup_type (T &hir_node) const { return lookup_type (hir_node.get_mappings ().get_hirid ()); } - [[nodiscard]] TyTy::BaseType *lookup_type (HirId hirid) const + WARN_UNUSED_RESULT TyTy::BaseType *lookup_type (HirId hirid) const { TyTy::BaseType *type = nullptr; bool ok = ctx.tyctx.lookup_type (hirid, &type); diff --git a/gcc/rust/checks/errors/borrowck/rust-bir-place.h b/gcc/rust/checks/errors/borrowck/rust-bir-place.h index 66b131dee1a7..8c2df47c11d1 100644 --- a/gcc/rust/checks/errors/borrowck/rust-bir-place.h +++ b/gcc/rust/checks/errors/borrowck/rust-bir-place.h @@ -148,9 +148,9 @@ public: 0); } - [[nodiscard]] PlaceId lookup_or_add_path (Place::Kind kind, - TyTy::BaseType *tyty, - PlaceId parent, size_t id = 0) + WARN_UNUSED_RESULT PlaceId lookup_or_add_path (Place::Kind kind, + TyTy::BaseType *tyty, + PlaceId parent, size_t id = 0) { PlaceId current = 0; if (parent < places.size ())
reply other threads:[~2024-01-30 12:00 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20240130120037.A8BF23857BA4@sourceware.org \ --to=cohenarthur@gcc.gnu.org \ --cc=gcc-cvs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).