1 error[E0562]: `impl Trait` only allowed in function and inherent method return types, not in `Fn` trait return
2 --> $DIR/feature-gate-impl_trait_in_fn_trait_return.rs:1:24
4 LL | fn f() -> impl Fn() -> impl Sized { || () }
7 = note: see issue #99697 <https://github.com/rust-lang/rust/issues/99697> for more information
8 = help: add `#![feature(impl_trait_in_fn_trait_return)]` to the crate attributes to enable
10 error[E0562]: `impl Trait` only allowed in function and inherent method return types, not in `Fn` trait return
11 --> $DIR/feature-gate-impl_trait_in_fn_trait_return.rs:3:32
13 LL | fn g() -> &'static dyn Fn() -> impl Sized { &|| () }
16 = note: see issue #99697 <https://github.com/rust-lang/rust/issues/99697> for more information
17 = help: add `#![feature(impl_trait_in_fn_trait_return)]` to the crate attributes to enable
19 error: aborting due to 2 previous errors
21 For more information about this error, try `rustc --explain E0562`.