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