]> git.lizzy.rs Git - rust.git/blob - src/test/ui/type-alias-impl-trait/multiple_definitions.rs
Auto merge of #95454 - randomicon00:fix95444, r=wesleywiser
[rust.git] / src / test / ui / type-alias-impl-trait / multiple_definitions.rs
1 // check-pass
2
3 use std::marker::PhantomData;
4
5 pub struct ConcreteError {}
6 pub trait IoBase {}
7 struct X {}
8 impl IoBase for X {}
9
10 pub struct ClusterIterator<B, E, S = B> {
11     pub fat: B,
12     phantom_s: PhantomData<S>,
13     phantom_e: PhantomData<E>,
14 }
15
16 pub struct FileSystem<IO: IoBase> {
17     pub disk: IO,
18 }
19
20 impl<IO: IoBase> FileSystem<IO> {
21     pub fn cluster_iter(&self) -> ClusterIterator<impl IoBase + '_, ConcreteError> {
22         ClusterIterator {
23             fat: X {},
24             phantom_s: PhantomData::default(),
25             phantom_e: PhantomData::default(),
26         }
27     }
28 }
29
30 fn main() {}