diff options
author | Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com> | 2025-01-20 13:49:25 +0100 |
---|---|---|
committer | P-E-P <32375388+P-E-P@users.noreply.github.com> | 2025-01-24 16:31:36 +0000 |
commit | 2b473162d33e0f3fe31a7f098c745cb388a01aa4 (patch) | |
tree | 7b7669368bde35613606f416d89f130a4e755f75 /gcc/alloc-pool.h | |
parent | dd750c98ceab1d511587edbceb78dbc5b7cfb15c (diff) | |
download | gcc-2b473162d33e0f3fe31a7f098c745cb388a01aa4.zip gcc-2b473162d33e0f3fe31a7f098c745cb388a01aa4.tar.gz gcc-2b473162d33e0f3fe31a7f098c745cb388a01aa4.tar.bz2 |
Add environment capture to NR2
The compiler was still relying on NR1 for closure captures when using nr2
even though the resolver was not used and thus it's state empty.
gcc/rust/ChangeLog:
* resolve/rust-late-name-resolver-2.0.cc (Late::visit): Add environment
collection.
* resolve/rust-late-name-resolver-2.0.h: Add function prototype.
* resolve/rust-name-resolver.cc (Resolver::get_captures): Add assertion
to prevent NR2 usage with nr1 capture functions.
* typecheck/rust-hir-type-check-expr.cc (TypeCheckExpr::visit): Use
nr2 captures.
* util/rust-hir-map.cc (Mappings::add_capture): Add function to
register capture for a given closure.
(Mappings::lookup_captures): Add a function to lookup all captures
available for a given closure.
* util/rust-hir-map.h: Add function prototypes.
Signed-off-by: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
Diffstat (limited to 'gcc/alloc-pool.h')
0 files changed, 0 insertions, 0 deletions