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