]> git.lizzy.rs Git - rust.git/blob - src/test/ui/impl-trait/trait_resolution.rs
Rollup merge of #98441 - calebzulawski:simd_as, r=oli-obk
[rust.git] / src / test / ui / impl-trait / trait_resolution.rs
1 // check-pass
2
3 use std::fmt::Debug;
4
5 pub struct EventStream<S> {
6     stream: S,
7 }
8
9 impl<S: Debug> EventStream<S> {
10     fn into_stream(self) -> impl Debug {
11         unimplemented!()
12     }
13
14     pub fn into_reader(self) -> impl Debug {
15         ReaderStream::from(self.into_stream())
16     }
17 }
18
19 #[derive(Debug)]
20 pub struct ReaderStream<S> {
21     stream: S,
22 }
23
24 impl<S> From<S> for ReaderStream<S> {
25     fn from(stream: S) -> Self {
26         ReaderStream { stream }
27     }
28 }
29
30 fn main() {}