]> git.lizzy.rs Git - rust.git/blob - tests/ui/impl-trait/impl-fn-parsing-ambiguities.rs
Rollup merge of #106799 - scottmcm:remove-unused-generics, r=cuviper
[rust.git] / tests / ui / impl-trait / impl-fn-parsing-ambiguities.rs
1 #![feature(impl_trait_in_fn_trait_return)]
2 use std::fmt::Debug;
3
4 fn a() -> impl Fn(&u8) -> impl Debug + '_ {
5     //~^ ERROR ambiguous `+` in a type
6     //~| ERROR higher kinded lifetime bounds on nested opaque types are not supported yet
7     |x| x
8 }
9
10 fn b() -> impl Fn() -> impl Debug + Send {
11     //~^ ERROR ambiguous `+` in a type
12     || ()
13 }
14
15 fn main() {}