-
-
Notifications
You must be signed in to change notification settings - Fork 14.2k
Closed
Labels
A-borrow-checkerArea: The borrow checkerArea: The borrow checkerC-bugCategory: This is a bug.Category: This is a bug.T-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-betaPerformance or correctness regression from stable to beta.Performance or correctness regression from stable to beta.
Description
See the repo at https://github.com/khuey/rust-nightly-borrow-checker-failure
This repository builds on 1.34.2. It fails on 1.35.0-beta.8 with
error[E0597]: `global_lock` does not live long enough
--> src/lib.rs:24:26
|
24 | let locked = global_lock.as_ref().lock().unwrap();
| ^^^^^^^^^^^ borrowed value does not live long enough
25 | ptr::write(&mut self.global_lock, Some(locked));
| --------------------- cast requires that `global_lock` is borrowed for `'static`
26 | }
27 | }
| - `global_lock` dropped here while still borrowed
error: aborting due to previous error
Metadata
Metadata
Assignees
Labels
A-borrow-checkerArea: The borrow checkerArea: The borrow checkerC-bugCategory: This is a bug.Category: This is a bug.T-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-betaPerformance or correctness regression from stable to beta.Performance or correctness regression from stable to beta.