]> git.lizzy.rs Git - rust.git/blob - tests/ui/lang-items/missing-clone-for-suggestion.stderr
Rollup merge of #106113 - krasimirgg:llvm-16-ext-tyid, r=nikic
[rust.git] / tests / ui / lang-items / missing-clone-for-suggestion.stderr
1 error[E0382]: use of moved value: `x`
2   --> $DIR/missing-clone-for-suggestion.rs:17:7
3    |
4 LL | fn f(x: *mut u8) {
5    |      - move occurs because `x` has type `*mut u8`, which does not implement the `Copy` trait
6 LL |     g(x);
7    |       - value moved here
8 LL |     g(x);
9    |       ^ value used here after move
10    |
11 note: consider changing this parameter type in function `g` to borrow instead if owning the value isn't necessary
12   --> $DIR/missing-clone-for-suggestion.rs:13:12
13    |
14 LL | fn g<T>(x: T) {}
15    |    -       ^ this parameter takes ownership of the value
16    |    |
17    |    in this function
18
19 error: aborting due to previous error
20
21 For more information about this error, try `rustc --explain E0382`.