aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/rust/compile/redef_error6.rs
blob: f7f688b5f36918f0c87f3ac7f6c315aa671195b1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
struct Foo<T>(T, usize);

impl Foo<i32> {
    fn test() -> i32 {
        123
    }

    fn test(self) -> i32 { // { dg-error "defined multiple times" }
        self.0
    }
}

fn main() {}