1 // Check that using the parameter name in its type does not ICE.
2 // edition:2018
3 
4 #![feature(async_closure)]
5 
main()6 fn main() {
7     let _ = |x: x| x; //~ ERROR expected type
8     let _ = |x: bool| -> x { x }; //~ ERROR expected type
9     let _ = async move |x: x| x; //~ ERROR expected type
10     let _ = async move |x: bool| -> x { x }; //~ ERROR expected type
11 }
12 
foo(x: x)13 fn foo(x: x) {} //~ ERROR expected type
foo_ret(x: bool) -> x14 fn foo_ret(x: bool) -> x {} //~ ERROR expected type
15 
async_foo(x: x)16 async fn async_foo(x: x) {} //~ ERROR expected type
async_foo_ret(x: bool) -> x17 async fn async_foo_ret(x: bool) -> x {} //~ ERROR expected type
18