Uh oh!
There was an error while loading. Please reload this page.
Local is copy - #68512
Conversation
| // which might not force the base local to memory, | ||
| // so we have to do it manually. | ||
| self.visit_local(place_ref.local, context, location); | ||
| self.visit_local(&place_ref.local, context, location); |
There was a problem hiding this comment.
This should also take a Local instead of &Local but I'd leave that for a deeper change related to visitors.
| pub struct PlaceRef<'a, 'tcx> { | ||
| pub local: &'a Local, | ||
| pub local: Local, | ||
| pub projection: &'a [PlaceElem<'tcx>], |
There was a problem hiding this comment.
Orthogonal, but the 'a here could be 'tcx, right?
There was a problem hiding this comment.
Unsure, I just did it to try out and I'm getting ...
error[E0597]: `deref` does not live long enough
--> src/librustc_mir/borrow_check/mod.rs:1400:41
|
855 | impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
| ---- lifetime `'tcx` defined here
...
1400 | root_place.projection = &deref;
| ^^^^^^ borrowed value does not live long enough
...
1413 | if places_conflict::borrow_conflicts_with_place(
| ____________-
1414 | | self.infcx.tcx,
1415 | | &self.body,
1416 | | place,
... |
1420 | | places_conflict::PlaceConflictBias::Overlap,
1421 | | ) {
| |_________- argument requires that `deref` is borrowed for `'tcx`
...
1433 | }
| - `deref` dropped here while still borrowed
error[E0621]: explicit lifetime required in the type of `issued_borrow`
--> src/librustc_mir/borrow_check/diagnostics/conflict_errors.rs:547:9
|
344 | issued_borrow: &BorrowData<'tcx>,
| ----------------- help: add explicit lifetime `'cx` to the type of `issued_borrow`: `&'cx borrow_check::borrow_set::BorrowData<'tcx>`
...
547 | err
| ^^^ lifetime `'cx` required
error: aborting due to 2 previous errors
Some errors have detailed explanations: E0597, E0621.
For more information about an error, try `rustc --explain E0597`.
error: could not compile `rustc_mir`.
To learn more, run the command again with --verbose.
Didn't pay a lot of attention to be honest, should I fix this in this PR or investigate this on a different one?.
There was a problem hiding this comment.
I think you should start by replacing PlaceRef<'_, 'tcx> with PlaceRef<'tcx, 'tcx> and see where that breaks down (most things should be able to handle it, although... unsure how useful it is?).
Uh oh!
There was an error while loading. Please reload this page.
oli-obk
commented
Jan 24, 2020
@bors r+ |
bors
commented
Jan 24, 2020
📌 Commit 3859a47 has been approved by |
bors
commented
Jan 25, 2020
⌛ Testing commit 3859a47 with merge 5a876001662d48c423f261d4dd619a551d48ec0a... |
rust-highfive
commented
Jan 25, 2020
The job Click to expand the log.I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
bors
commented
Jan 25, 2020
💔 Test failed - checks-azure |
oli-obk
commented
Jan 25, 2020
Oh heh, yea this would break clippy. Let's hold up on it until the breakage week is done |
3859a47 to
a13a7d7Comparerust-highfive
commented
Jan 28, 2020
The job Click to expand the log.I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
oli-obk
commented
Jan 28, 2020
@bors r+ |
bors
commented
Jan 28, 2020
📌 Commit 3021856 has been approved by |
bors
commented
Jan 29, 2020
bors
commented
Jan 29, 2020
☀️ Test successful - checks-azure |
rust-highfive
commented
Jan 29, 2020
📣 Toolstate changed by #68512! Tested on commit 343432a. 💔 clippy-driver on windows: test-pass → build-fail (cc @mcarton@oli-obk@Manishearth@flip1995@yaahc@phansch@llogiq, @rust-lang/infra). |
Tested on commit rust-lang/rust@343432a. Direct link to PR: <rust-lang/rust#68512> 💔 clippy-driver on windows: test-pass → build-fail (cc @mcarton@oli-obk@Manishearth@flip1995@yaahc@phansch@llogiq, @rust-lang/infra). 💔 clippy-driver on linux: test-pass → build-fail (cc @mcarton@oli-obk@Manishearth@flip1995@yaahc@phansch@llogiq, @rust-lang/infra).
Rustup to rust-lang/rust#68512 changelog: none
r? @oli-obk