public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r14-7895] gccrs: [E0015] Use of non-const inside const
@ 2024-01-16 18:05 Arthur Cohen
0 siblings, 0 replies; only message in thread
From: Arthur Cohen @ 2024-01-16 18:05 UTC (permalink / raw)
To: gcc-cvs
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2024-01-16 18:05 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-16 18:05 [gcc r14-7895] gccrs: [E0015] Use of non-const inside const Arthur Cohen
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).