3 fn fine(x: impl Into<u32>) -> impl Into<u32> { x }
5 fn bad_in_ret_position(x: impl Into<u32>) -> impl Into<impl Debug> { x }
6 //~^ ERROR nested `impl Trait` is not allowed
8 fn bad_in_fn_syntax(x: fn() -> impl Into<impl Debug>) {}
9 //~^ ERROR nested `impl Trait` is not allowed
10 //~^^ `impl Trait` not allowed
12 fn bad_in_arg_position(_: impl Into<impl Debug>) { }
13 //~^ ERROR nested `impl Trait` is not allowed
17 fn bad(x: impl Into<u32>) -> impl Into<impl Debug> { x }
18 //~^ ERROR nested `impl Trait` is not allowed
21 fn allowed_in_assoc_type() -> impl Iterator<Item=impl Fn()> {
22 vec![|| println!("woot")].into_iter()
25 fn allowed_in_ret_type() -> impl Fn() -> impl Into<u32> {
26 //~^ `impl Trait` not allowed