]> git.lizzy.rs Git - rust.git/blob - src/test/ui/methods/method-self-arg-1.stderr
Implementation for 65853
[rust.git] / src / test / ui / methods / method-self-arg-1.stderr
1 error[E0308]: mismatched types
2   --> $DIR/method-self-arg-1.rs:11:14
3    |
4 LL |     Foo::bar(x);
5    |     -------- ^
6    |     |        |
7    |     |        expected `&Foo`, found struct `Foo`
8    |     |        help: consider borrowing here: `&x`
9    |     arguments to this function are incorrect
10    |
11 note: associated function defined here
12   --> $DIR/method-self-arg-1.rs:6:8
13    |
14 LL |     fn bar(&self) {}
15    |        ^^^ -----
16
17 error[E0308]: mismatched types
18   --> $DIR/method-self-arg-1.rs:13:14
19    |
20 LL |     Foo::bar(&42);
21    |     -------- ^^^ expected struct `Foo`, found integer
22    |     |
23    |     arguments to this function are incorrect
24    |
25    = note: expected reference `&Foo`
26               found reference `&{integer}`
27 note: associated function defined here
28   --> $DIR/method-self-arg-1.rs:6:8
29    |
30 LL |     fn bar(&self) {}
31    |        ^^^ -----
32
33 error: aborting due to 2 previous errors
34
35 For more information about this error, try `rustc --explain E0308`.