about summary refs log tree commit diff
path: root/src/rustllvm/RustWrapper.cpp
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2018-01-04 05:52:39 +0000
committerbors <bors@rust-lang.org>2018-01-04 05:52:39 +0000
commit78f24d86b84882a02c15f27768e831d0342a3f5d (patch)
tree393f3cb3cdb06825658ae1f00142dc74889f997a /src/rustllvm/RustWrapper.cpp
parent608aae904b14efd09b4f95d9f4c3f030e6a34f95 (diff)
parenta4d46b3d87e9c83ffb78489a513a100e5422ac81 (diff)
downloadrust-78f24d86b84882a02c15f27768e831d0342a3f5d.tar.gz
rust-78f24d86b84882a02c15f27768e831d0342a3f5d.zip
Auto merge of #47124 - estebank:loan-paths, r=nikomatsakis
Reword reason for move note

On move errors, when encountering an enum variant, be more ambiguous and do not refer to the type on the cause note, to avoid referring to `(maybe as std::prelude::v1::Some).0`, and instead refer to `the value`.

Sidesteps part of the problem with #41962:

```
error[E0382]: use of partially moved value: `maybe`
 --> file.rs:5:30
  |
5 |         if let Some(thing) = maybe {
  |                     -----    ^^^^^ value used here after move
  |                     |
  |                     value moved here
  = note: move occurs because the value has type `std::vec::Vec<bool>`, which does not implement the `Copy` trait

error[E0382]: use of moved value: `(maybe as std::prelude::v1::Some).0`
 --> file.rs:5:21
  |
5 |         if let Some(thing) = maybe {
  |                     ^^^^^ value moved here in previous iteration of loop
  = note: move occurs because the value has type `std::vec::Vec<bool>`, which does not implement the `Copy` trait

error: aborting due to 2 previous errors
```

Previous discussion: #44360

r? @arielb1
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions