diff options
author | Philip Herron <philip.herron@embecosm.com> | 2022-10-18 13:21:40 +0100 |
---|---|---|
committer | Arthur Cohen <arthur.cohen@embecosm.com> | 2023-02-21 12:36:39 +0100 |
commit | 740a1997228d0b568afa11b1afe89128d9afff37 (patch) | |
tree | 0aa7fde752e1fcc0dd946a743836fb30ad215460 /gcc/rust/backend/rust-compile-block.h | |
parent | 898240946ca2e351889015d36a60498e40b4a9fc (diff) | |
download | gcc-740a1997228d0b568afa11b1afe89128d9afff37.zip gcc-740a1997228d0b568afa11b1afe89128d9afff37.tar.gz gcc-740a1997228d0b568afa11b1afe89128d9afff37.tar.bz2 |
gccrs: Initial Type resolution for closures
gcc/rust/ChangeLog:
* hir/tree/rust-hir-expr.h: Add `get_params` method.
* typecheck/rust-hir-type-check-expr.cc (TypeCheckExpr::visit): Typecheck closure nodes.
(TypeCheckExpr::resolve_fn_trait_call): New function.
* typecheck/rust-hir-type-check-expr.h: Declare `resolve_fn_trait_call` and
`resolve_possible_fn_trait_call_method_name`.
* typecheck/rust-hir-type-check.h: Declare `get_context_type`.
* typecheck/rust-tyctx.cc (TypeCheckContextItem::get_context_type): New function.
* typecheck/rust-tyty-cmp.h: Visit closures properly.
* typecheck/rust-tyty-rules.h: Likewise.
* typecheck/rust-tyty.cc (BaseType::bounds_compatible): Add commented out assertin.
(ClosureType::as_string): Implement it.
(ClosureType::clone): Fix closure cloning.
(ClosureType::setup_fn_once_output): New function.
* typecheck/rust-tyty.h: Improve `ClosureType` class and declare `setup_fn_once_output`.
Diffstat (limited to 'gcc/rust/backend/rust-compile-block.h')
0 files changed, 0 insertions, 0 deletions