summaryrefslogtreecommitdiffstats
path: root/tests/ui/error-codes/E0119.rs
blob: 7f89e5a1a52dfb69a53bb64b50e5d36989fd2472 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
trait MyTrait {
    fn get(&self) -> usize;
}

impl<T> MyTrait for T {
    fn get(&self) -> usize { 0 }
}

struct Foo {
    value: usize
}

impl MyTrait for Foo { //~ ERROR E0119
    fn get(&self) -> usize { self.value }
}

fn main() {
}