summaryrefslogtreecommitdiff
path: root/gcc/testsuite/rust/compile/parse_complex_generic_application.rs
blob: 02877dd727edaf28adced9ad90d50bcb5bf792a6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#[lang = "sized"]
pub trait Sized {}

pub enum Either<T, E> {
    Left(T),
    Right(E),
}

pub mod err {
    pub struct Error;
    pub struct ErrorWrap<T>(T);
}

pub fn foo_err() -> Either<(), err::Error> {
    Either::Left(())
}

pub fn foo_err_wrap() -> Either<(), err::ErrorWrap<u8>> {
    Either::Left(())
}