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

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

14 lines
175 B
Rust
Raw Normal View History

2016-06-01 14:30:13 +00:00
trait Foo {
2016-08-04 17:56:12 +00:00
fn foo(&self); //~ `&self` used in trait
2016-06-01 14:30:13 +00:00
}
struct Bar;
impl Foo for Bar {
fn foo() {} //~ ERROR E0186
2016-08-04 17:56:12 +00:00
//~^ expected `&self` in impl
2016-06-01 14:30:13 +00:00
}
fn main() {
}