rust/tests/ui/error-codes/E0185.rs

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

16 lines
207 B
Rust
Raw Normal View History

2016-06-01 14:30:13 +00:00
trait Foo {
fn foo();
//~^ NOTE trait method declared without `&self`
2016-06-01 14:30:13 +00:00
}
struct Bar;
impl Foo for Bar {
fn foo(&self) {}
//~^ ERROR E0185
//~| NOTE `&self` used in impl
2016-06-01 14:30:13 +00:00
}
fn main() {
}