Closed
Description
This might not actually be a regression an instead the code may have previously erroneously compiled. I cannot find an an open issue obviously related to this though.
As you can see here this code does not compile with a "borrowed value does not live long enough" where it did previously. This comes from a call to diff::diff
which has this signature.
The error message states that n
may be dropped while the borrow in the next param state
is still active. This fails to compile on both 1.50 and 1.49 if the param state
is move to a local variable.
@rustbot modify labels: +regression-from-stable-to-beta
Metadata
Metadata
Assignees
Labels
Type
Projects
Relationships
Development
No branches or pull requests
Activity
apiraino commentedon Jan 13, 2021
Let's try to reduce it @rustbot ping cleanup
rustbot commentedon Jan 13, 2021
Hey Cleanup Crew ICE-breakers! This bug has been identified as a good
"Cleanup ICE-breaking candidate". In case it's useful, here are some
instructions for tackling these sorts of bugs. Maybe take a look?
Thanks! <3
cc @AminArria @camelid @chrissimpkins @contrun @DutchGhost @elshize @ethanboxx @h-michael @HallerPatrick @hdhoang @hellow554 @imtsuki @JamesPatrickGill @kanru @KarlK90 @LeSeulArtichaut @MAdrianMattocks @matheus-consoli @mental32 @nmccarty @Noah-Kennedy @pard68 @PeytonT @pierreN @Redblueflame @RobbieClarken @RobertoSnap @robjtede @SarthakSingh31 @shekohex @sinato @smmalis37 @steffahn @Stupremee @tamuhey @turboladen @woshilapin @yerke
hellow554 commentedon Jan 13, 2021
Still with dependency, but simplified code
let's see what I can get from there
hellow554 commentedon Jan 13, 2021
searched nightlies: from nightly-2020-12-01 to nightly-2021-01-06
regressed nightly: nightly-2020-12-06
searched commits: from 3ff10e7 to e792288
regressed commit: 9122b76
bisected with cargo-bisect-rustc v0.6.0
Host triple: x86_64-unknown-linux-gnu
Reproduce with:
The code I tested:
cc #78373 @matthewjasper
rustbot commentedon Jan 13, 2021
Error: Label ICEBreaker-Cleanup-Crew can only be set by Rust team members
Please let
@rust-lang/release
know if you're having trouble with this bot.matthewjasper commentedon Jan 14, 2021
So #78373 resulted in MIR having one fewer block, which is making borrowck be less precise with how long the borrow lasts. There are a few possible fixes here for me to look at.
30 remaining items