]> git.ipfire.org Git - thirdparty/gcc.git/commit
gccrs: Change lookup_hir_implitem return type
authorPierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
Fri, 3 May 2024 14:30:06 +0000 (16:30 +0200)
committerArthur Cohen <arthur.cohen@embecosm.com>
Mon, 17 Mar 2025 15:35:25 +0000 (16:35 +0100)
commit01e2a53cb84f959f400af79172843e4bc906ff9a
tree8c45bdcd3e71474fabfb416b5d5e89915c627901
parentf7031e6a2cefc31f38604189ff3d98af2321aebb
gccrs: Change lookup_hir_implitem return type

Wrap the return type within an optional. Now return the parent id within
a pair instead of taking an out reference.

gcc/rust/ChangeLog:

* backend/rust-compile-item.cc (CompileItem::visit): Change call site
to accept new return type.
* backend/rust-compile-resolve-path.cc (HIRCompileBase::query_compile):
Likewise.
* backend/rust-mangle-v0.cc (v0_path): Likewise.
* checks/errors/rust-unsafe-checker.cc (UnsafeChecker::visit):
Likewise.
* checks/lints/rust-lint-marklive.cc (MarkLive::go): Likewise.
(MarkLive::visit): Likewise.
* typecheck/rust-type-util.cc (query_type): Likewise.
* util/rust-hir-map.cc (Mappings::insert_hir_implitem): Likewise.
(Mappings::lookup_hir_implitem): Change return type.
* util/rust-hir-map.h: Update the function's prototype.

Signed-off-by: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
gcc/rust/backend/rust-compile-item.cc
gcc/rust/backend/rust-compile-resolve-path.cc
gcc/rust/backend/rust-mangle-v0.cc
gcc/rust/checks/errors/rust-unsafe-checker.cc
gcc/rust/checks/lints/rust-lint-marklive.cc
gcc/rust/typecheck/rust-type-util.cc
gcc/rust/util/rust-hir-map.cc
gcc/rust/util/rust-hir-map.h