Update E0185 and E0186 to new format
This commit is contained in:
parent
ea07d52676
commit
64873965fa
3 changed files with 20 additions and 4 deletions
|
|
@ -9,13 +9,14 @@
|
|||
// except according to those terms.
|
||||
|
||||
trait Foo {
|
||||
fn foo();
|
||||
fn foo(); //~ trait declared without `&self`
|
||||
}
|
||||
|
||||
struct Bar;
|
||||
|
||||
impl Foo for Bar {
|
||||
fn foo(&self) {} //~ ERROR E0185
|
||||
//~^ `&self` used in impl
|
||||
}
|
||||
|
||||
fn main() {
|
||||
|
|
|
|||
|
|
@ -9,13 +9,14 @@
|
|||
// except according to those terms.
|
||||
|
||||
trait Foo {
|
||||
fn foo(&self);
|
||||
fn foo(&self); //~ `&self` used in trait
|
||||
}
|
||||
|
||||
struct Bar;
|
||||
|
||||
impl Foo for Bar {
|
||||
fn foo() {} //~ ERROR E0186
|
||||
//~^ expected `&self` in impl
|
||||
}
|
||||
|
||||
fn main() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue