From: Arthur Cohen <[email protected]>

gcc/rust/ChangeLog:

        * checks/errors/rust-unsafe-checker.cc (UnsafeChecker::visit): Add 
Types as a
        namespace in which to lookup PathInExpressions.
---
This change was merged into the gccrs repository and is posted here for
upstream visibility and potential drive-by review, as requested by GCC
release managers.
Each commit email contains a link to its details on github from where you can
find the Pull-Request and associated discussions.


Commit on github: 
https://github.com/Rust-GCC/gccrs/commit/cf48299ecddffa3f4ef2946057dafc20c2a0c554

The commit has NOT been mentioned in any issue.

The commit has been mentioned in the following pull-request(s):
 - https://github.com/Rust-GCC/gccrs/pull/4551

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

diff --git a/gcc/rust/checks/errors/rust-unsafe-checker.cc 
b/gcc/rust/checks/errors/rust-unsafe-checker.cc
index da4530ab2..379cd4c9a 100644
--- a/gcc/rust/checks/errors/rust-unsafe-checker.cc
+++ b/gcc/rust/checks/errors/rust-unsafe-checker.cc
@@ -222,8 +222,9 @@ UnsafeChecker::visit (PathInExpression &path)
   NodeId ref_node_id;
 
   if (auto resolved
-      = resolver.lookup (ast_node_id, Resolver2_0::Namespace::Values))
-    ref_node_id = resolved.value ();
+      = resolver.lookup (ast_node_id, Resolver2_0::Namespace::Values,
+                        Resolver2_0::Namespace::Types))
+    ref_node_id = resolved->id;
   else
     return;
 
-- 
2.54.0

Reply via email to