2019-10-24 00:45:15 -05:00
|
|
|
// 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;
|
2020-01-31 13:35:37 -06:00
|
|
|
impl T for () { fn bar(&self, _: &usize, _: &usize) -> usize { todo!() }
|
|
|
|
unsafe fn foo(_: &usize, _: &usize) -> usize { todo!() }
|
2019-10-24 00:45:15 -05:00
|
|
|
} //~ ERROR not all trait items
|
|
|
|
|
|
|
|
impl T for usize { //~ ERROR not all trait items
|
2020-01-31 13:35:37 -06:00
|
|
|
fn bar(&self, _: &usize, _: &usize) -> usize { todo!() }
|
|
|
|
unsafe fn foo(_: &usize, _: &usize) -> usize { todo!() }
|
2019-10-24 00:45:15 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {}
|