about summary refs log tree commit diff
path: root/tests/ui/moves/region-var-in-moved-ty-issue-133118.stderr
blob: 691625d042da71b7fb27290f15f60ddcb15c4e3f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
error[E0382]: use of moved value: `g1`
  --> $DIR/region-var-in-moved-ty-issue-133118.rs:22:15
   |
LL |     let g1 = beta.gamma();
   |         -- move occurs because `g1` has type `<&B as Beta>::Gamma`, which does not implement the `Copy` trait
LL |     a(g1) + a(g1)
   |       --      ^^ value used here after move
   |       |
   |       value moved here
   |
note: consider changing this parameter type in function `a` to borrow instead if owning the value isn't necessary
  --> $DIR/region-var-in-moved-ty-issue-133118.rs:12:24
   |
LL | pub fn a<T: Alpha>(_x: T) -> usize {
   |        -               ^ this parameter takes ownership of the value
   |        |
   |        in this function

error: aborting due to 1 previous error

For more information about this error, try `rustc --explain E0382`.