public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r14-7684] gccrs: ErrorCode[E0433] Use of Undeclared Crate, Module, or Type
@ 2024-01-16 17:53 Arthur Cohen
0 siblings, 0 replies; only message in thread
From: Arthur Cohen @ 2024-01-16 17:53 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:a7d480eef4e3ce9792f2c714551b656b7278d31e
commit r14-7684-ga7d480eef4e3ce9792f2c714551b656b7278d31e
Author: Muhammad Mahad <mahadtxt@gmail.com>
Date: Tue Jun 20 00:47:19 2023 +0500
gccrs: ErrorCode[E0433] Use of Undeclared Crate, Module, or Type
gcc/rust/ChangeLog:
* resolve/rust-ast-resolve-path.cc (ResolvePath::resolve_path): called rust_error_at
* resolve/rust-ast-resolve-type.cc (ResolveRelativeTypePath::go): called rust_error_at
Signed-off-by: Muhammad Mahad <mahadtxt@gmail.com>
Diff:
---
gcc/rust/resolve/rust-ast-resolve-path.cc | 6 ++----
gcc/rust/resolve/rust-ast-resolve-type.cc | 4 +---
2 files changed, 3 insertions(+), 7 deletions(-)
diff --git a/gcc/rust/resolve/rust-ast-resolve-path.cc b/gcc/rust/resolve/rust-ast-resolve-path.cc
index 38e18bbbef0..67ff7d9bcd1 100644
--- a/gcc/rust/resolve/rust-ast-resolve-path.cc
+++ b/gcc/rust/resolve/rust-ast-resolve-path.cc
@@ -62,9 +62,7 @@ ResolvePath::resolve_path (AST::PathInExpression *expr)
bool in_middle_of_path = i > 0;
if (in_middle_of_path && segment.is_lower_self_seg ())
{
- // error[E0433]: failed to resolve: `self` in paths can only be used
- // in start position
- rust_error_at (segment.get_locus (),
+ rust_error_at (segment.get_locus (), ErrorCode ("E0433"),
"failed to resolve: %<%s%> in paths can only be used "
"in start position",
segment.as_string ().c_str ());
@@ -208,7 +206,7 @@ ResolvePath::resolve_path (AST::PathInExpression *expr)
}
else if (is_first_segment)
{
- rust_error_at (segment.get_locus (),
+ rust_error_at (segment.get_locus (), ErrorCode ("E0433"),
"Cannot find path %<%s%> in this scope",
segment.as_string ().c_str ());
return UNKNOWN_NODEID;
diff --git a/gcc/rust/resolve/rust-ast-resolve-type.cc b/gcc/rust/resolve/rust-ast-resolve-type.cc
index 62fbf7fcef3..58f677d7909 100644
--- a/gcc/rust/resolve/rust-ast-resolve-type.cc
+++ b/gcc/rust/resolve/rust-ast-resolve-type.cc
@@ -98,9 +98,7 @@ ResolveRelativeTypePath::go (AST::TypePath &path, NodeId &resolved_node_id)
bool in_middle_of_path = i > 0;
if (in_middle_of_path && segment->is_lower_self_seg ())
{
- // error[E0433]: failed to resolve: `self` in paths can only be used
- // in start position
- rust_error_at (segment->get_locus (),
+ rust_error_at (segment->get_locus (), ErrorCode ("E0433"),
"failed to resolve: %<%s%> in paths can only be used "
"in start position",
segment->as_string ().c_str ());
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2024-01-16 17:53 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-16 17:53 [gcc r14-7684] gccrs: ErrorCode[E0433] Use of Undeclared Crate, Module, or Type 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).