diff options
author | Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com> | 2024-04-24 22:32:54 +0200 |
---|---|---|
committer | P-E-P <32375388+P-E-P@users.noreply.github.com> | 2024-05-17 15:28:30 +0000 |
commit | 402d329819bebd43918aaa68adb698fb4989f987 (patch) | |
tree | e2328edbbb5df49632e4ab14c6877c8cc16cc6d2 /gcc/rust/backend/rust-mangle-v0.cc | |
parent | 6dff797adfaac68b063da06024d42d357d6069a6 (diff) | |
download | gcc-402d329819bebd43918aaa68adb698fb4989f987.zip gcc-402d329819bebd43918aaa68adb698fb4989f987.tar.gz gcc-402d329819bebd43918aaa68adb698fb4989f987.tar.bz2 |
Change lookup_hir_to_node return type to optional
Optional are more convenient to use and avoid uninitialized data.
gcc/rust/ChangeLog:
* backend/rust-compile-expr.cc (CompileExpr::generate_closure_function):
Adapt code for new optional return type.
* checks/errors/privacy/rust-privacy-reporter.cc (PrivacyReporter::check_base_type_privacy):
Likewise.
* util/rust-hir-map.cc (Mappings::lookup_hir_to_node): Change return
type to an optional.
* util/rust-hir-map.h: Adapt function prototype with the new return
type.
Signed-off-by: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
Diffstat (limited to 'gcc/rust/backend/rust-mangle-v0.cc')
0 files changed, 0 insertions, 0 deletions