2018-08-08 07:28:26 -05:00
|
|
|
error[E0308]: mismatched types
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/method-self-arg-1.rs:11:14
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
|
LL | Foo::bar(x); //~ ERROR mismatched types
|
|
|
|
| ^
|
|
|
|
| |
|
|
|
|
| expected &Foo, found struct `Foo`
|
|
|
|
| help: consider borrowing here: `&x`
|
|
|
|
|
|
|
|
|
= note: expected type `&Foo`
|
|
|
|
found type `Foo`
|
|
|
|
|
|
|
|
error[E0308]: mismatched types
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/method-self-arg-1.rs:15:14
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
|
LL | Foo::bar(&42); //~ ERROR mismatched types
|
2018-12-31 19:43:08 -06:00
|
|
|
| ^^^ expected struct `Foo`, found integer
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
|
= note: expected type `&Foo`
|
|
|
|
found type `&{integer}`
|
|
|
|
|
|
|
|
error: aborting due to 2 previous errors
|
|
|
|
|
|
|
|
For more information about this error, try `rustc --explain E0308`.
|