2019-10-23 22:45:15 -07:00
|
|
|
//@ run-rustfix
|
2024-02-07 10:42:01 +08:00
|
|
|
#![allow(dead_code)]
|
2019-10-23 22:45:15 -07:00
|
|
|
|
|
|
|
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 11:35:37 -08:00
|
|
|
impl T for () { fn bar(&self, _: &usize, _: &usize) -> usize { todo!() }
|
|
|
|
unsafe fn foo(_: &usize, _: &usize) -> usize { todo!() }
|
2019-10-23 22:45:15 -07:00
|
|
|
} //~ ERROR not all trait items
|
|
|
|
|
|
|
|
impl T for usize { //~ ERROR not all trait items
|
2020-01-31 11:35:37 -08:00
|
|
|
fn bar(&self, _: &usize, _: &usize) -> usize { todo!() }
|
|
|
|
unsafe fn foo(_: &usize, _: &usize) -> usize { todo!() }
|
2019-10-23 22:45:15 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {}
|