rust/tests/ui/suggestions/missing-trait-item.fixed

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

22 lines
566 B
Rust
Raw Normal View History

//@ run-rustfix
2024-02-07 02:42:01 +00:00
#![allow(dead_code)]
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!() }
} //~ 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!() }
}
}
fn main() {}