summaryrefslogtreecommitdiffstats
path: root/tests/ui/suggestions/missing-trait-item.fixed
blob: a1cf359ec91248f64417dd8e4c4df5c9853833b7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// run-rustfix

trait T {
    unsafe fn foo(a: &usize, b: &usize) -> usize;
    fn bar(&self, a: &usize, b: &usize) -> usize;
}

mod foo {
    use super::T;
    impl T for () {    fn bar(&self, _: &usize, _: &usize) -> usize { todo!() }
        unsafe fn foo(_: &usize, _: &usize) -> usize { todo!() }
    } //~ ERROR not all trait items

    impl T for usize { //~ ERROR not all trait items
        fn bar(&self, _: &usize, _: &usize) -> usize { todo!() }
        unsafe fn foo(_: &usize, _: &usize) -> usize { todo!() }
    }
}

fn main() {}