blob: 343a27616d1d2dd2bf9bd9e33d82d54efba3894f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
#![feature(unboxed_closures)]
//@ check-pass
// Regression test for #131758. We only know the type of `x` after closure upvar
// inference is done, even if we don't need to structurally resolve the type of `x`.
trait Foo {}
impl<T: Fn<(i32,)>> Foo for T {}
fn baz<T: Foo>(_: T) {}
fn main() {
baz(|x| ());
}
|