@@ -48,7 +48,6 @@ fn in_dyn_Fn_parameter_in_parameters(_: &dyn Fn(impl Debug)) { panic!() }
4848// Disallowed
4949fn in_dyn_Fn_return_in_parameters ( _: & dyn Fn ( ) -> impl Debug ) { panic ! ( ) }
5050//~^ ERROR `impl Trait` not allowed outside of function and inherent method return types
51- // FIXME -- no error currently
5251
5352// Disallowed
5453fn in_dyn_Fn_parameter_in_return ( ) -> & ' static dyn Fn ( impl Debug ) { panic ! ( ) }
@@ -57,7 +56,6 @@ fn in_dyn_Fn_parameter_in_return() -> &'static dyn Fn(impl Debug) { panic!() }
5756// Disallowed
5857fn in_dyn_Fn_return_in_return ( ) -> & ' static dyn Fn ( ) -> impl Debug { panic ! ( ) }
5958//~^ ERROR `impl Trait` not allowed outside of function and inherent method return types
60- // FIXME -- no error currently
6159
6260// Disallowed
6361fn in_impl_Fn_parameter_in_parameters ( _: & impl Fn ( impl Debug ) ) { panic ! ( ) }
@@ -66,7 +64,6 @@ fn in_impl_Fn_parameter_in_parameters(_: &impl Fn(impl Debug)) { panic!() }
6664// Disallowed
6765fn in_impl_Fn_return_in_parameters ( _: & impl Fn ( ) -> impl Debug ) { panic ! ( ) }
6866//~^ ERROR `impl Trait` not allowed outside of function and inherent method return types
69- // FIXME -- no error currently
7067
7168// Disallowed
7269fn in_impl_Fn_parameter_in_return ( ) -> & ' static impl Fn ( impl Debug ) { panic ! ( ) }
@@ -75,7 +72,15 @@ fn in_impl_Fn_parameter_in_return() -> &'static impl Fn(impl Debug) { panic!() }
7572// Disallowed
7673fn in_impl_Fn_return_in_return ( ) -> & ' static impl Fn ( ) -> impl Debug { panic ! ( ) }
7774//~^ ERROR `impl Trait` not allowed outside of function and inherent method return types
78- // FIXME -- no error currently
75+
76+ // Disallowed
77+ fn in_Fn_parameter_in_generics < F : Fn ( impl Debug ) > ( _: F ) { panic ! ( ) }
78+ //~^ ERROR `impl Trait` not allowed outside of function and inherent method return types
79+
80+ // Disallowed
81+ fn in_Fn_return_in_generics < F : Fn ( ) -> impl Debug > ( _: F ) { panic ! ( ) }
82+ //~^ ERROR `impl Trait` not allowed outside of function and inherent method return types
83+
7984
8085// Allowed
8186fn in_impl_Trait_in_parameters ( _: impl Iterator < Item = impl Iterator > ) { panic ! ( ) }
0 commit comments