rust/tests/ui/async-await/issue-74047.rs
2023-01-11 09:32:08 +00:00

18 lines
310 B
Rust

// 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() {}