summaryrefslogtreecommitdiffstats
path: root/tests/ui/async-await/issue-74047.rs
blob: 2e4f3e675c3b1bcd6b50bd44c70dbf64044faf2e (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() {}