From: Arthur Cohen Date: Wed, 3 Jun 2026 09:29:56 +0000 (+0200) Subject: gccrs: unsafe: Lookup PathInExpression nodes in both the Types and Values NS. X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=2d6442d536fd2ecf2296b9e9132ca8be6ed37e98;p=thirdparty%2Fgcc.git gccrs: unsafe: Lookup PathInExpression nodes in both the Types and Values NS. gcc/rust/ChangeLog: * checks/errors/rust-unsafe-checker.cc (UnsafeChecker::visit): Add Types as a namespace in which to lookup PathInExpressions. --- diff --git a/gcc/rust/checks/errors/rust-unsafe-checker.cc b/gcc/rust/checks/errors/rust-unsafe-checker.cc index da4530ab258..379cd4c9a38 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;