From: Pierre-Emmanuel Patry <[email protected]>
gcc/rust/ChangeLog:
* resolve/rust-late-name-resolver-2.0.cc (Late::visit): Change error
message.
gcc/testsuite/ChangeLog:
* rust/compile/nr2/exclude: Remove passing test from exclusion list.
Signed-off-by: Pierre-Emmanuel Patry <[email protected]>
---
gcc/rust/resolve/rust-late-name-resolver-2.0.cc | 4 ++--
gcc/testsuite/rust/compile/nr2/exclude | 2 --
2 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/gcc/rust/resolve/rust-late-name-resolver-2.0.cc
b/gcc/rust/resolve/rust-late-name-resolver-2.0.cc
index cd81080ce15..e0cd9515180 100644
--- a/gcc/rust/resolve/rust-late-name-resolver-2.0.cc
+++ b/gcc/rust/resolve/rust-late-name-resolver-2.0.cc
@@ -355,8 +355,8 @@ Late::visit (AST::PathInExpression &expr)
if (!resolved)
{
if (!ctx.lookup (expr.get_segments ().front ().get_node_id ()))
- rust_error_at (expr.get_locus (),
- "could not resolve path expression: %qs",
+ rust_error_at (expr.get_locus (), ErrorCode::E0433,
+ "Cannot find path %qs in this scope",
expr.as_simple_path ().as_string ().c_str ());
return;
}
diff --git a/gcc/testsuite/rust/compile/nr2/exclude
b/gcc/testsuite/rust/compile/nr2/exclude
index d3efe08a531..ed1241bcdf6 100644
--- a/gcc/testsuite/rust/compile/nr2/exclude
+++ b/gcc/testsuite/rust/compile/nr2/exclude
@@ -1,8 +1,6 @@
canonical_paths1.rs
-cfg1.rs
generics9.rs
issue-3315-2.rs
-lookup_err1.rs
multiple_bindings1.rs
multiple_bindings2.rs
privacy5.rs
--
2.49.0