aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/resolve
diff options
context:
space:
mode:
authorPhilip Herron <philip.herron@embecosm.com>2022-10-18 13:21:40 +0100
committerPhilip Herron <philip.herron@embecosm.com>2022-10-20 16:10:08 +0100
commitfeaa40602b7ecad36de8dcb6c387e686d04ce207 (patch)
tree895572249bbca638d4eb1ee5de8edbff61b7ae26 /gcc/rust/resolve
parente637c0445bc4633a1a6ab1d5c32e3ee82cf03152 (diff)
downloadgcc-feaa40602b7ecad36de8dcb6c387e686d04ce207.zip
gcc-feaa40602b7ecad36de8dcb6c387e686d04ce207.tar.gz
gcc-feaa40602b7ecad36de8dcb6c387e686d04ce207.tar.bz2
Initial Type resolution for closures
This adds the type checking for a HIR::ClosureExpr which specifies a TyTy::ClosureType whih inherits the FnOnce trait by default. The specialisation of the trait bound needs to be determined by the the mutability and argument capture and moveablity rules. The CallExpr is amended here so that we support CallExpr's for all receivers that implement any of the FnTraits. This means closures and generics that have the relevant type bound of FnTraits we get the same path of type checking. Addresses #195
Diffstat (limited to 'gcc/rust/resolve')
0 files changed, 0 insertions, 0 deletions