]> git.lizzy.rs Git - rust.git/blob - src/test/ui/error-codes/E0119.rs
Rollup merge of #59056 - scottmcm:even-fewer-lifetimes, r=sfackler
[rust.git] / src / test / ui / error-codes / E0119.rs
1 trait MyTrait {
2     fn get(&self) -> usize;
3 }
4
5 impl<T> MyTrait for T {
6     fn get(&self) -> usize { 0 }
7 }
8
9 struct Foo {
10     value: usize
11 }
12
13 impl MyTrait for Foo { //~ ERROR E0119
14     fn get(&self) -> usize { self.value }
15 }
16
17 fn main() {
18 }