fork/rust

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

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

master
503 B21 linesraw
1error[E0308]: mismatched types
2  --> $DIR/issue-61106.rs:3:9
3   |
4LL |     foo(x.clone());
5   |     --- ^^^^^^^^^ expected `&str`, found `String`
6   |     |
7   |     arguments to this function are incorrect
8   |
9note: function defined here
10  --> $DIR/issue-61106.rs:6:4
11   |
12LL | fn foo(_: &str) {}
13   |    ^^^ -------
14help: consider borrowing here
15   |
16LL |     foo(&x.clone());
17   |         +
18
19error: aborting due to previous error
20
21For more information about this error, try `rustc --explain E0308`.