fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

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