public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r14-7896] gccrs: [E0658] Unstable langauge feature
@ 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:a60bafec5a093a19d81000468789c153d0112db8
commit r14-7896-ga60bafec5a093a19d81000468789c153d0112db8
Author: Muhammad Mahad <mahadtxt@gmail.com>
Date: Wed Aug 9 00:27:08 2023 +0500
gccrs: [E0658] Unstable langauge feature
gcc/rust/ChangeLog:
* checks/errors/rust-const-checker.cc (ConstChecker::visit):
Use of mutable reference in constant functions.
* checks/errors/rust-feature-gate.cc (FeatureGate::gate):
ErrorCode for intrinsics are subject to change.
Signed-off-by: Muhammad Mahad <mahadtxt@gmail.com>
Diff:
---
gcc/rust/checks/errors/rust-const-checker.cc | 2 +-
gcc/rust/checks/errors/rust-feature-gate.cc | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/gcc/rust/checks/errors/rust-const-checker.cc b/gcc/rust/checks/errors/rust-const-checker.cc
index e7e2bf781fc..03b8f6a7c20 100644
--- a/gcc/rust/checks/errors/rust-const-checker.cc
+++ b/gcc/rust/checks/errors/rust-const-checker.cc
@@ -862,7 +862,7 @@ void
ConstChecker::visit (ReferenceType &type)
{
if (const_context.is_in_context () && type.is_mut ())
- rust_error_at (type.get_locus (),
+ rust_error_at (type.get_locus (), ErrorCode::E0658,
"mutable references are not allowed in constant functions");
}
diff --git a/gcc/rust/checks/errors/rust-feature-gate.cc b/gcc/rust/checks/errors/rust-feature-gate.cc
index 11f6675b470..0f6b6c06582 100644
--- a/gcc/rust/checks/errors/rust-feature-gate.cc
+++ b/gcc/rust/checks/errors/rust-feature-gate.cc
@@ -86,7 +86,7 @@ FeatureGate::gate (Feature::Name name, location_t loc,
{
const char *fmt_str
= "%s. add `#![feature(%s)]` to the crate attributes to enable.";
- rust_error_at (loc, fmt_str, error_msg.c_str (),
+ rust_error_at (loc, ErrorCode::E0658, fmt_str, error_msg.c_str (),
feature.as_string ().c_str ());
}
}
^ 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-7896] gccrs: [E0658] Unstable langauge feature 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).