mirror of https://github.com/rust-lang/rust.git
17 lines
318 B
Rust
17 lines
318 B
Rust
#![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| ());
|
|
}
|