]> git.ipfire.org Git - thirdparty/gcc.git/commit
gccrs: nr2.0: Improve error handling
authorOwen Avery <powerboat9.gamer@gmail.com>
Thu, 17 Apr 2025 17:51:43 +0000 (13:51 -0400)
committerArthur Cohen <arthur.cohen@embecosm.com>
Mon, 28 Apr 2025 14:18:55 +0000 (16:18 +0200)
commit3b2fa2a414f61dfbe60e3f96491a7d0f37f7100c
tree6b2f5e50695422055399e9646b754d87a10b4c6c
parentfe8cd8f56677daf90011d91de557f7dc461639ee
gccrs: nr2.0: Improve error handling

gcc/rust/ChangeLog:

* resolve/rust-early-name-resolver-2.0.cc
(Early::build_import_mapping): Avoid outputting an "unresolved
import" error if other errors are outputted during resolution.
* resolve/rust-early-name-resolver-2.0.h
(Early::resolve_path_in_all_ns): Collect path resolution errors
while avoiding duplicate errors for resolutions in each
namespace.
* resolve/rust-forever-stack.h
(ForeverStack::resolve_path): Add parameter for collecting
errors.
(ForeverStack::find_starting_point): Likewise.
(ForeverStack::resolve_segments): Likewise.
* resolve/rust-forever-stack.hxx
(check_leading_kw_at_start): Likewise.
(ForeverStack::find_starting_point): Likewise.
(ForeverStack::resolve_segments): Likewise.
(ForeverStack::resolve_path): Likewise.
* resolve/rust-name-resolution-context.h
(NameResolutionContext::resolve_path): Add optional parameter
for collecting errors.

gcc/testsuite/ChangeLog:

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

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