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