Uh oh!
There was an error while loading. Please reload this page.
Explain move errors that occur due to method calls involving self (take two) - #73708
Conversation
rust-highfive
commented
Jun 24, 2020
r? @davidtwco (rust_highfive has picked a reviewer for you, use r? to override) |
self (take two)Uh oh!
There was an error while loading. Please reload this page.
I'd like to investigate the possibility of removing lowering-time expansions entirely in some observable future, but in the meantime this looks ok. (I didn't look at the rustc_mir parts.) |
petrochenkov
commented
Jun 25, 2020
r? @davidtwco |
davidtwco
left a comment
There was a problem hiding this comment.
LGTM, one question about the new diagnostic output but otherwise great.
Uh oh!
There was an error while loading. Please reload this page.
bors
commented
Jun 25, 2020
☔ The latest upstream changes (presumably #72559) made this pull request unmergeable. Please resolve the merge conflicts. |
cf4c2db to
fbf1cd7CompareAaron1011
commented
Jun 25, 2020
@davidtwco: This should now be ready to merge |
davidtwco
commented
Jun 25, 2020
@bors r+ |
bors
commented
Jun 25, 2020
📌 Commit fbf1cd7790fb55de65b9d36f5cb3feadfa385046 has been approved by |
…arth Rollup of 14 pull requests Successful merges: - rust-lang#72617 (Add a fast path for `std::thread::panicking`.) - rust-lang#72738 (Self contained linking option) - rust-lang#72770 (Implement mixed script confusable lint.) - rust-lang#73418 (Add unstable `core::mem::variant_count` intrinsic) - rust-lang#73460 (Emit line info for generator variants) - rust-lang#73534 (Provide suggestions for some moved value errors) - rust-lang#73538 (make commented examples use valid syntax, and be more consistent ) - rust-lang#73581 (Create 0766 error code) - rust-lang#73619 (Document the mod keyword) - rust-lang#73621 (Document the mut keyword) - rust-lang#73648 (Document the return keyword) - rust-lang#73673 (Fix ptr doc warnings.) - rust-lang#73674 (Tweak binop errors) - rust-lang#73687 (Clean up E0701 explanation) Failed merges: - rust-lang#73708 (Explain move errors that occur due to method calls involving `self` (take two)) r? @ghost
bors
commented
Jun 26, 2020
☔ The latest upstream changes (presumably #73746) made this pull request unmergeable. Please resolve the merge conflicts. |
Uh oh!
There was an error while loading. Please reload this page.
Also, implement this query for the local crate, not just foreign crates.
fbf1cd7 to
d412181CompareAaron1011
commented
Jun 26, 2020
@davidtwco:I've rebased against master, and applied @jyn514's suggestion |
This is a re-attempt of rust-lang#72389 (which was reverted in rust-lang#73594) Instead of using `ExpnKind::Desugaring` to represent operators, this PR checks the lang item directly.
d412181 to
fa6a61cComparedavidtwco
commented
Jun 27, 2020
@bors r+ |
bors
commented
Jun 27, 2020
📌 Commit fa6a61c has been approved by |
…arth Rollup of 10 pull requests Successful merges: - rust-lang#72796 (MIR sanity check: validate types on assignment) - rust-lang#73243 (Add documentation to point to `File::open` or `OpenOptions::open` instead of `is_file` to check read/write possibility) - rust-lang#73525 (Prepare for LLVM 11) - rust-lang#73672 (Adds a clearer message for when the async keyword is missing from a f…) - rust-lang#73708 (Explain move errors that occur due to method calls involving `self` (take two)) - rust-lang#73758 (improper_ctypes: fix remaining `Reveal:All`) - rust-lang#73763 (errors: use `-Z terminal-width` in JSON emitter) - rust-lang#73796 (replace more `DefId`s with `LocalDefId`) - rust-lang#73797 (fix typo in self-profile.md) - rust-lang#73809 (Add links to fs::DirEntry::metadata) Failed merges: r? @ghost
PR rust-lang#73708 added a more detailed explanation of move errors that occur due to a call to a method that takes `self`. This PR extends that logic to work when a move error occurs due to a method call in the previous iteration of a loop.
Explain method-call move errors in loops PR rust-lang#73708 added a more detailed explanation of move errors that occur due to a call to a method that takes `self`. This PR extends that logic to work when a move error occurs due to a method call in the previous iteration of a loop.
This is a re-attempt of #72389 (which was reverted in #73594)
Instead of using
ExpnKind::Desugaringto represent operators, this PRchecks the lang item directly.