-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
A-NLLArea: Non-lexical lifetimes (NLL)Area: Non-lexical lifetimes (NLL)A-borrow-checkerArea: The borrow checkerArea: The borrow checkerA-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsC-bugCategory: This is a bug.Category: This is a bug.NLL-diagnosticsWorking towards the "diagnostic parity" goalWorking towards the "diagnostic parity" goalP-mediumMedium priorityMedium priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.regression-from-stable-to-stablePerformance or correctness regression from one stable version to another.Performance or correctness regression from one stable version to another.
Milestone
Description
I mean regression in the sense that code that used to compile doesn’t anymore. Maybe that is an intentional soundness fix.
Compiling https://crates.io/crates/brotli / https://github.com/dropbox/rust-brotli with:
- rustc 1.25.0-nightly (61452e5 2018-01-09): OK
- rustc 1.25.0-nightly (f62f774 2018-01-10): borrowck error:
error[E0502]: cannot borrow `self.buckets_` as immutable because it is also borrowed as mutable
--> src/enc/backward_references.rs:339:51
|
338 | (*self).buckets_.slice_mut()[(key as (usize)).wrapping_add((cur_ix >> 3)
| ---------------- mutable borrow occurs here
339 | .wrapping_rem(self.buckets_.BUCKET_SWEEP() as
| ^^^^^^^^^^^^^ immutable borrow occurs here
340 | usize))] = cur_ix as (u32);
| - mutable borrow ends here
error: aborting due to previous error
error: Could not compile `brotli`.
Commit range: 61452e5...f62f774. #47167 seems relevant. CC @ivanbakel @eddyb
Metadata
Metadata
Assignees
Labels
A-NLLArea: Non-lexical lifetimes (NLL)Area: Non-lexical lifetimes (NLL)A-borrow-checkerArea: The borrow checkerArea: The borrow checkerA-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsC-bugCategory: This is a bug.Category: This is a bug.NLL-diagnosticsWorking towards the "diagnostic parity" goalWorking towards the "diagnostic parity" goalP-mediumMedium priorityMedium priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.regression-from-stable-to-stablePerformance or correctness regression from one stable version to another.Performance or correctness regression from one stable version to another.