]> git.lizzy.rs Git - rust.git/blob - tests/ui/type-alias-impl-trait/generic_duplicate_lifetime_param.rs
Rollup merge of #106766 - GuillaumeGomez:rm-stripper-dead-code, r=notriddle
[rust.git] / tests / ui / type-alias-impl-trait / generic_duplicate_lifetime_param.rs
1 #![feature(type_alias_impl_trait)]
2
3 fn main() {}
4
5 pub trait Captures<'a> {}
6
7 impl<'a, T: ?Sized> Captures<'a> for T {}
8
9 type Two<'a, 'b> = impl std::fmt::Debug + Captures<'a> + Captures<'b>;
10
11 fn one<'a>(t: &'a ()) -> Two<'a, 'a> {
12     t
13     //~^ ERROR non-defining opaque type use
14 }