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-7895] gccrs: [E0015] Use of non-const inside const
Date: Tue, 16 Jan 2024 18:05:16 +0000 (GMT)	[thread overview]
Message-ID: <20240116180516.257A73858418@sourceware.org> (raw)

https://gcc.gnu.org/g:9e208648cb9b1a4a52e5402ad9b1722ec690b0e7

commit r14-7895-g9e208648cb9b1a4a52e5402ad9b1722ec690b0e7
Author: Muhammad Mahad <mahadtxt@gmail.com>
Date:   Tue Aug 8 18:39:29 2023 +0500

    gccrs: [E0015] Use of non-const inside const
    
    gcc/rust/ChangeLog:
    
            * checks/errors/rust-const-checker.cc (ConstChecker::check_function_call):
            Added errorcode.
    
    Signed-off-by: Muhammad Mahad <mahadtxt@gmail.com>

Diff:
---
 gcc/rust/checks/errors/rust-const-checker.cc | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/gcc/rust/checks/errors/rust-const-checker.cc b/gcc/rust/checks/errors/rust-const-checker.cc
index 510b42d090c..e7e2bf781fc 100644
--- a/gcc/rust/checks/errors/rust-const-checker.cc
+++ b/gcc/rust/checks/errors/rust-const-checker.cc
@@ -339,8 +339,9 @@ ConstChecker::check_function_call (HirId fn_id, location_t locus)
     }
 
   if (is_error)
-    rust_error_at (locus, "only functions marked as %<const%> are allowed to "
-			  "be called from constant contexts");
+    rust_error_at (locus, ErrorCode::E0015,
+		   "only functions marked as %<const%> are allowed to be "
+		   "called from constant contexts");
 }
 
 void

                 reply	other threads:[~2024-01-16 18:05 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=20240116180516.257A73858418@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: link
Be 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).