summaryrefslogtreecommitdiffstats
path: root/src/test/ui/cross-crate/auxiliary/xcrate_generic_fn_nested_return.rs
blob: 2ab23b4d7e45c2a1af7f024f2383b0c923dbff7f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
pub struct Request {
    pub id: String,
    pub arg: String,
}

pub fn decode<T>() -> Result<Request, ()> {
    (|| {
        Ok(Request {
            id: "hi".to_owned(),
            arg: match Err(()) {
                Ok(v) => v,
                Err(e) => return Err(e)
            },
        })
    })()
}