summaryrefslogtreecommitdiffstats
path: root/tests/ui/point-to-type-err-cause-on-impl-trait-return-2.rs
blob: 50f1fe873cb5fa1cd96f0eb31a185c3c161d4299 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
fn unrelated() -> Result<(), std::string::ParseError> {  // #57664
    let x = 0;

    match x {
        1 => {
            let property_value_as_string = "a".parse()?;
        }
        2 => {
            let value: &bool = unsafe { &42 };
            //~^ ERROR mismatched types
        }
    };

    Ok(())
}

fn main() {}