diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2019-09-24 22:12:26 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2019-09-24 22:12:26 +0100 |
commit | c7420ddaaa76741d1eebe393406b38ba5596e54a (patch) | |
tree | ff9c2f3c665ef95ebf509dc69ff82d39ec42d176 /crates/ra_parser/src/parser.rs | |
parent | 36fb3f53d712a11b7e3fc4bbd92094d1c8f19522 (diff) | |
parent | 6a8670665032f6103ca14e38ed9106126b20063d (diff) |
Merge #1845
1845: Closure types r=flodiebold a=flodiebold
This adds types for closures and makes them implement the `Fn` traits (we don't currently care or try to infer `Fn` vs. `FnMut` vs. `FnOnce`; this would require move analysis, I think).
This requires some changes in Chalk; one is that we need to know the self type when asked for impls, so we can synthesize `Fn` trait impls for closures; but also there's a problem that prevents us from normalizing the closure output type correctly that I _think_ will be fixed on the Chalk side (basically, we ask too early and try to solve `Normalize(<?1 as FnOnce<(u32,)>>::Output => ?0)` -- note the variable in the self type -- and instead of an ambiguous answer, we get back that it can't be solved, so we don't try again. Niko mentioned he's making all goals where the self type is unconstrained flounder, which I think would mean this would be ambiguous).
Co-authored-by: Florian Diebold <[email protected]>
Diffstat (limited to 'crates/ra_parser/src/parser.rs')
0 files changed, 0 insertions, 0 deletions