-
Couldn't load subscription status.
- Fork 13.9k
Description
This is a big that's been on the back of my mind for a while but I don't think it has a bug associated with it. When we build the region hierarchy, we assume that any ||-closure argument is limited to the lifetime of the call where it appears. However, since the more general form of fn& was implemented, I don't believe this is enforced. We should place an upper-bound on the || lifetime and add some tests. In an ideal world, maybe we would always infer the lifetime of an ||-closure, but this is tricky to do because the region hierarchy is built before region inference (and indeed it must be, in order to compute LUB/GLB and so forth).