]> git.lizzy.rs Git - rust.git/blob - src/test/ui/impl-trait/impl-fn-predefined-lifetimes.rs
Rollup merge of #103953 - TaKO8Ki:remove-unused-arg-from-throw_unresolved_import_erro...
[rust.git] / src / test / ui / impl-trait / impl-fn-predefined-lifetimes.rs
1 #![feature(impl_trait_in_fn_trait_return)]
2 use std::fmt::Debug;
3
4 fn a<'a>() -> impl Fn(&'a u8) -> (impl Debug + '_) {
5     //~^ ERROR cannot resolve opaque type
6
7     |x| x
8     //~^ ERROR concrete type differs from previous defining opaque type use
9 }
10
11 fn _b<'a>() -> impl Fn(&'a u8) -> (impl Debug + 'a) {
12     a()
13 }
14
15 fn main() {}