]> git.ipfire.org Git - thirdparty/gcc.git/commit
nr2.0: Resolve paths which start with Self
authorOwen Avery <powerboat9.gamer@gmail.com>
Tue, 4 Feb 2025 10:02:38 +0000 (05:02 -0500)
committerCohenArthur <arthur.cohen@embecosm.com>
Mon, 17 Feb 2025 09:08:38 +0000 (09:08 +0000)
commit681805f7eeaf0ff15045892d289f7e4fe0ea589c
treeadac45cdcd8d675e82340461d7a907288f3c2427
parentde2446d5766e98b23e1aaaea0890b157b2d565d5
nr2.0: Resolve paths which start with Self

gcc/rust/ChangeLog:

* resolve/rust-forever-stack.hxx
(ForeverStack::find_starting_point): Be more careful about
applying ForeverStack::find_closest_module.
(ForeverStack::resolve_segments): Allow traversal into parent
nodes when not in a module node or root node, which
ForeverStack::find_starting_point previously made moot through
use of ForeverStack::find_closest_module. Also, when a child
node lookup fails when resolving in the type namespace, attempt
a rib lookup as a fallback.
* resolve/rust-late-name-resolver-2.0.cc
(Late::visit): Avoid throwing a resolution error for type paths
when the typechecker may be able to finish the resolution. Also,
throw an error when a resolution is ambiguous.

gcc/testsuite/ChangeLog:

* rust/compile/nr2/exclude: Remove entries.

Signed-off-by: Owen Avery <powerboat9.gamer@gmail.com>
gcc/rust/resolve/rust-forever-stack.hxx
gcc/rust/resolve/rust-late-name-resolver-2.0.cc
gcc/testsuite/rust/compile/nr2/exclude