mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-14 17:48:10 +00:00
16 lines
207 B
Rust
16 lines
207 B
Rust
trait Foo {
|
|
fn foo();
|
|
//~^ NOTE trait method declared without `&self`
|
|
}
|
|
|
|
struct Bar;
|
|
|
|
impl Foo for Bar {
|
|
fn foo(&self) {}
|
|
//~^ ERROR E0185
|
|
//~| NOTE `&self` used in impl
|
|
}
|
|
|
|
fn main() {
|
|
}
|