]> git.ipfire.org Git - thirdparty/gcc.git/commit
Small improvements to DefaultASTVisitor and nr2.0
authorOwen Avery <powerboat9.gamer@gmail.com>
Thu, 8 May 2025 21:32:05 +0000 (17:32 -0400)
committerP-E-P <32375388+P-E-P@users.noreply.github.com>
Thu, 15 May 2025 10:32:23 +0000 (10:32 +0000)
commit4f772da8df444fbcb84821d4c4c60cf1cc2f5479
tree20f2c1ab0e98c05902217f38315fb2054fc6342b
parent7a562bcec1f7604e6df1b604979ce4c1456e6049
Small improvements to DefaultASTVisitor and nr2.0

gcc/rust/ChangeLog:

* ast/rust-ast-visitor.cc
(DefaultASTVisitor::visit): Only visit the path of an instance
of Visibility if the instance has a path.
* ast/rust-ast.h
(SimplePath::SimplePath): Make sure constructors are explicit.
* resolve/rust-early-name-resolver-2.0.cc
(Early::visit_attributes): Pass entire paths to
NameResolutionContext::resolve_path.
(Early::visit): Likewise and avoid copying a path.
* resolve/rust-forever-stack.hxx
(ForeverStack::resolve_path): Assert that at least one path
segment has been passed in.

Signed-off-by: Owen Avery <powerboat9.gamer@gmail.com>
gcc/rust/ast/rust-ast-visitor.cc
gcc/rust/ast/rust-ast.h
gcc/rust/resolve/rust-early-name-resolver-2.0.cc
gcc/rust/resolve/rust-forever-stack.hxx