about summary refs log tree commit diff
path: root/src/rustllvm/PassWrapper.cpp
diff options
context:
space:
mode:
authorMazdak Farrokhzad <twingoow@gmail.com>2019-01-25 01:36:59 +0100
committerGitHub <noreply@github.com>2019-01-25 01:36:59 +0100
commitf20c6c8581f5fb5c7cb679736d7a0dcbefa7b038 (patch)
treecb159db003b758c5142df8b6e46e35ed6bfad2a0 /src/rustllvm/PassWrapper.cpp
parent284e1a86c0e3e3aed269b5c545d3e9dc78bafa8a (diff)
parentbaa0828ee35475987fd825d8eaf77e009dca2bbe (diff)
downloadrust-f20c6c8581f5fb5c7cb679736d7a0dcbefa7b038.tar.gz
rust-f20c6c8581f5fb5c7cb679736d7a0dcbefa7b038.zip
Rollup merge of #57294 - estebank:point-copy-less, r=nikomatsakis
When using value after move, point at span of local

When trying to use a value after move, instead of using a note, point
at the local declaration that has a type that doesn't implement `Copy`
trait.

```
error[E0382]: use of moved value: `x`
  --> $DIR/issue-34721.rs:27:9
   |
LL |     pub fn baz<T: Foo>(x: T) -> T {
   |                -       - move occurs because `x` has type `T`, which does not implement the `Copy` trait
   |                |
   |                consider adding a `Copy` constraint to this type argument
LL |         if 0 == 1 {
LL |             bar::bar(x.zero())
   |                      - value moved here
LL |         } else {
LL |             x.zero()
   |             - value moved here
LL |         };
LL |         x.zero()
   |         ^ value used here after move
```

Fix #34721.
Diffstat (limited to 'src/rustllvm/PassWrapper.cpp')
0 files changed, 0 insertions, 0 deletions