@@ -44,6 +44,7 @@ fn in_dyn_Fn_parameter_in_return() -> &'static dyn Fn(impl Debug) { panic!() }
4444
4545// Allowed
4646fn in_dyn_Fn_return_in_return ( ) -> & ' static dyn Fn ( ) -> impl Debug { panic ! ( ) }
47+ //~^ ERROR: type annotations needed
4748
4849// Disallowed
4950fn in_impl_Fn_parameter_in_parameters ( _: & impl Fn ( impl Debug ) ) { panic ! ( ) }
@@ -58,9 +59,11 @@ fn in_impl_Fn_return_in_parameters(_: &impl Fn() -> impl Debug) { panic!() }
5859fn in_impl_Fn_parameter_in_return ( ) -> & ' static impl Fn ( impl Debug ) { panic ! ( ) }
5960//~^ ERROR `impl Trait` is not allowed in the parameters of `Fn` trait bounds
6061//~| ERROR nested `impl Trait` is not allowed
62+ //~| ERROR: type annotations needed
6163
6264// Allowed
6365fn in_impl_Fn_return_in_return ( ) -> & ' static impl Fn ( ) -> impl Debug { panic ! ( ) }
66+ //~^ ERROR: type annotations needed
6467
6568// Disallowed
6669fn in_Fn_parameter_in_generics < F : Fn ( impl Debug ) > ( _: F ) { panic ! ( ) }
@@ -77,6 +80,7 @@ fn in_impl_Trait_in_parameters(_: impl Iterator<Item = impl Iterator>) { panic!(
7780// Allowed
7881fn in_impl_Trait_in_return ( ) -> impl IntoIterator < Item = impl IntoIterator > {
7982 vec ! [ vec![ 0 ; 10 ] , vec![ 12 ; 7 ] , vec![ 8 ; 3 ] ]
83+ //~^ ERROR: no function or associated item named `into_vec` found for slice `[_]`
8084}
8185
8286// Disallowed
@@ -118,11 +122,13 @@ trait DummyTrait {
118122impl DummyTrait for ( ) {
119123 type Out = impl Debug ;
120124 //~^ ERROR `impl Trait` in associated types is unstable
125+ //~| ERROR unconstrained opaque type
121126
122127 fn in_trait_impl_parameter ( _: impl Debug ) { }
123128 // Allowed
124129
125130 fn in_trait_impl_return ( ) -> impl Debug { ( ) }
131+ //~^ ERROR `in_trait_impl_return` has an incompatible type for trait
126132 // Allowed
127133}
128134
0 commit comments