]> git.lizzy.rs Git - rust.git/blob - src/test/ui/closure-expected-type/expect-two-infer-vars-supply-ty-with-bound-region.rs
Rollup merge of #105758 - Nilstrieb:typeck-results-mod, r=compiler-errors
[rust.git] / src / test / ui / closure-expected-type / expect-two-infer-vars-supply-ty-with-bound-region.rs
1 fn with_closure<F, A, B>(_: F)
2     where F: FnOnce(A, B)
3 {
4 }
5
6 fn a() {
7     // Type of `y` is unconstrained.
8     with_closure(|x: u32, y| {}); //~ ERROR E0282
9 }
10
11 fn b() {
12     with_closure(|x: u32, y: u32| {}); // OK
13 }
14
15 fn c() {
16     with_closure(|x: u32, y: u32| {}); // OK
17 }
18
19 fn main() { }