]> git.lizzy.rs Git - rust.git/blob - tests/ui/impl-trait/in-trait/where-clause.rs
Auto merge of #106742 - compiler-errors:new-solver-make-it-not-ice, r=lcnr
[rust.git] / tests / ui / impl-trait / in-trait / where-clause.rs
1 // check-pass
2 // edition: 2021
3
4 #![feature(return_position_impl_trait_in_trait)]
5 #![allow(incomplete_features)]
6
7 use std::fmt::Debug;
8
9 trait Foo<Item> {
10     fn foo<'a>(&'a self) -> impl Debug
11     where
12         Item: 'a;
13 }
14
15 impl<Item, D: Debug + Clone> Foo<Item> for D {
16     fn foo<'a>(&'a self) -> impl Debug
17     where
18         Item: 'a,
19     {
20         self.clone()
21     }
22 }
23
24 fn main() {}