-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Reword reason for move note #47124
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reword reason for move note #47124
Conversation
503bdc3
to
65ac7e8
Compare
89c1e15
to
ce930bb
Compare
@@ -346,6 +346,16 @@ impl<'tcx> LoanPath<'tcx> { | |||
} | |||
|
|||
fn to_type(&self) -> Ty<'tcx> { self.ty } | |||
|
|||
fn is_downcast(&self) -> bool { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: maybe call this has_downcast
? Also, we should try this out with the MIR borrowck.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
r=me after those changes
@bors r=nikomatsakis |
📌 Commit a4d46b3 has been approved by |
⌛ Testing commit a4d46b3 with merge 681c86ad0f7ce4158656a312031b47151ff87c24... |
💔 Test failed - status-appveyor |
@bors retry
|
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
☀️ Test successful - status-appveyor, status-travis |
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 tothe value
.Sidesteps part of the problem with #41962:
Previous discussion: #44360
r? @arielb1