]>
Commit | Line | Data |
---|---|---|
3dfed10e XL |
1 | // edition:2018 |
2 | ||
3 | use std::convert::{TryFrom, TryInto}; | |
4 | use std::io; | |
5 | ||
6 | pub struct MyStream; | |
7 | pub struct OtherStream; | |
8 | ||
9 | pub async fn connect() -> io::Result<MyStream> { | |
10 | let stream: MyStream = OtherStream.try_into()?; | |
11 | Ok(stream) | |
12 | } | |
13 | ||
14 | impl TryFrom<OtherStream> for MyStream {} | |
15 | //~^ ERROR: missing | |
16 | ||
17 | fn main() {} |