Closed
Description
The following tests used to have nice specific reports about the role of Fn
or FnMut
in the code (and how it impacts the uses of free variables, aka "outer variables", in the body of the closure), but all of that has been lost in NLL.
- borrowck/borrowck-in-static.rs
- issue-21600.rs
- suggestions/closure-immutable-outer-variable.rs
- suggestions/fn-closure-mutable-capture.rs
- borrowck/unboxed-closures-move-upvar-from-non-once-ref-closure.rs
I suspect the following are also fundamentally related, though the particular diagnostics differ. (We may well want to branch them off into their own independent issues.)
- closure_context/issue-42065.rs
- (here instead of reporting an error about
Fn
/FnMut
/FnOnce
, we instead point out that the closure in question cannot be invoked multiple times; i.e. we must have inferred it to be anFnOnce
, but that isn't part of the presented error message, for better or for worse).
- (here instead of reporting an error about
(This list of tests is drawn from an informal paper document that I have been using to keep notes for myself as I work on this...)