]> git.lizzy.rs Git - rust.git/blob - tests/ui/feature-gates/feature-gate-impl_trait_in_fn_trait_return.rs
Rollup merge of #106427 - mejrs:translation_errors, r=davidtwco
[rust.git] / tests / ui / feature-gates / feature-gate-impl_trait_in_fn_trait_return.rs
1 fn f() -> impl Fn() -> impl Sized { || () }
2 //~^ ERROR `impl Trait` only allowed in function and inherent method return types, not in `Fn` trait return
3 fn g() -> &'static dyn Fn() -> impl Sized { &|| () }
4 //~^ ERROR `impl Trait` only allowed in function and inherent method return types, not in `Fn` trait return
5
6 fn main() {}