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