aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/rust/compile/issue-2166.rs
blob: 142ed178e7e4f62cba91660b44e601ac39e9f185 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#[lang = "sized"]
pub trait Sized {}

trait Add {
    type Output;

    fn add(self) -> u32;
}

impl Add for u32 {
    type Output = u32;

    fn add(self) -> u32 {
        0
    }
}

impl<'a> Add for &'a u32 {
    type Output = u32;

    fn add(self) -> <u32 as Add>::Output {
        0
    }
}