fork/rust

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

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

master
860 B35 linesraw
1error[E0308]: mismatched types
2  --> $DIR/issue-106443-sugg-clone-for-arg.rs:11:9
3   |
4LL |     foo(s);
5   |     --- ^ expected `S`, found `&S`
6   |     |
7   |     arguments to this function are incorrect
8   |
9note: function defined here
10  --> $DIR/issue-106443-sugg-clone-for-arg.rs:7:4
11   |
12LL | fn foo(_: S) {}
13   |    ^^^ ----
14help: consider using clone here
15   |
16LL |     foo(s.clone());
17   |          ++++++++
18
19error[E0308]: mismatched types
20  --> $DIR/issue-106443-sugg-clone-for-arg.rs:17:9
21   |
22LL |     bar(t);
23   |     --- ^ expected `T`, found `&T`
24   |     |
25   |     arguments to this function are incorrect
26   |
27note: function defined here
28  --> $DIR/issue-106443-sugg-clone-for-arg.rs:14:4
29   |
30LL | fn bar(_: T) {}
31   |    ^^^ ----
32
33error: aborting due to 2 previous errors
34
35For more information about this error, try `rustc --explain E0308`.