//@ edition:2018 use std::convert::{TryFrom, TryInto}; use std::io; pub struct MyStream; pub struct OtherStream; pub async fn connect() -> io::Result { let stream: MyStream = OtherStream.try_into()?; Ok(stream) } impl TryFrom for MyStream {} //~^ ERROR: missing fn main() {}