]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-61106.stderr
point at private fields in struct literal
[rust.git] / src / test / ui / issues / issue-61106.stderr
1 error[E0308]: mismatched types
2   --> $DIR/issue-61106.rs:3:9
3    |
4 LL |     foo(x.clone());
5    |     --- ^^^^^^^^^
6    |     |   |
7    |     |   expected `&str`, found struct `String`
8    |     |   help: consider borrowing here: `&x`
9    |     arguments to this function are incorrect
10    |
11 note: function defined here
12   --> $DIR/issue-61106.rs:6:4
13    |
14 LL | fn foo(_: &str) {}
15    |    ^^^ -------
16
17 error: aborting due to previous error
18
19 For more information about this error, try `rustc --explain E0308`.