gccrs: Add capture tracking to the type info for closures
authorPhilip Herron <philip.herron@embecosm.com>
Fri, 21 Oct 2022 14:39:52 +0000 (15:39 +0100)
committerArthur Cohen <arthur.cohen@embecosm.com>
Tue, 21 Feb 2023 11:36:52 +0000 (12:36 +0100)
commiteb1202224f8e9be687589d66011485b5fc582eb5
treecaa94e6d0d46a15845c32a99119b0c8a195fd8e5
parentf7c258b291182308538ff18c3ace76b1c11e699a
gccrs: Add capture tracking to the type info for closures

gcc/rust/ChangeLog:

* typecheck/rust-hir-type-check-expr.cc (TypeCheckExpr::visit): Pass captures
properly to `TyTy::ClosureType` constructor.
* typecheck/rust-tyty.cc (ClosureType::as_string): Fix string representation.
(ClosureType::clone): Pass `captures` argument.
* typecheck/rust-tyty.h: Add `captures` field.
gcc/rust/typecheck/rust-hir-type-check-expr.cc
gcc/rust/typecheck/rust-tyty.cc
gcc/rust/typecheck/rust-tyty.h