]> git.ipfire.org Git - thirdparty/gcc.git/commit
Change return type for lookup_hir_item to optional
authorPierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
Thu, 25 Apr 2024 08:48:47 +0000 (10:48 +0200)
committerP-E-P <32375388+P-E-P@users.noreply.github.com>
Fri, 17 May 2024 15:28:30 +0000 (15:28 +0000)
commit69e1835807dac79b426eb357e87191502d979657
treea3f8871a55caf15a7957c60759235bc2fa3bb476
parent73f87d81c0ee1af1f9e9cc838e16653729173851
Change return type for lookup_hir_item to optional

gcc/rust/ChangeLog:

* backend/rust-compile-resolve-path.cc (HIRCompileBase::query_compile):
Adapt function call to new return type.
* backend/rust-mangle-v0.cc (v0_path): Likewise.
* checks/errors/rust-const-checker.cc (ConstChecker::check_function_call):
Likewise.
* checks/errors/rust-unsafe-checker.cc (UnsafeChecker::check_use_of_static):
Likewise.
(UnsafeChecker::check_function_call): Likewise.
(UnsafeChecker::check_function_attr): Likewise.
* checks/lints/rust-lint-marklive.cc (MarkLive::go): Likewise.
(MarkLive::visit): Likewise.
* typecheck/rust-hir-trait-resolve.cc (TraitResolver::resolve_path_to_trait):
Likewise.
* typecheck/rust-type-util.cc (query_type): Likewise.
* util/rust-hir-map.cc (Mappings::insert_hir_item): Likewise.
(Mappings::lookup_hir_item): Change function return type to use
optional.
* util/rust-hir-map.h: Update function prototype.

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