-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
A-lifetimesArea: Lifetimes / regionsArea: Lifetimes / regionsA-trait-systemArea: Trait systemArea: Trait systemC-bugCategory: This is a bug.Category: This is a bug.P-criticalCritical priorityCritical 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-nightlyPerformance or correctness regression from stable to nightly.Performance or correctness regression from stable to nightly.
Description
I discovered that some code I had previously been using no longer compiles with the current nightly. It gives E0477 which, as other issues have pointed out, is incorrectly described as "no longer emitted by the compiler".
Code
I expected to see this happen: The code compiles successfully
Instead, this happened: I get this compiler error:
error[E0477]: the type `PrettyCondo<'_>` does not fulfill the required lifetime
--> src/lib.rs:41:5
|
41 | fn add_building(&mut self, _building: &mut PrettyCondo<'_>) {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
note: type must outlive the anonymous lifetime as defined here
--> src/lib.rs:41:21
|
41 | fn add_building(&mut self, _building: &mut PrettyCondo<'_>) {
| ^
For more information about this error, try `rustc --explain E0477`.
error: could not compile `e0477-test` due to previous error
Result of cargo-bisect-rustc
searched nightlies: from nightly-2022-08-08 to nightly-2022-09-17
regressed nightly: nightly-2022-08-10
searched commit range: f03ce30...34a6cae
regressed commit: 63e4312
bisected with cargo-bisect-rustc v0.6.4
Host triple: x86_64-unknown-linux-gnu
Reproduce with:
cargo bisect-rustc
Metadata
Metadata
Assignees
Labels
A-lifetimesArea: Lifetimes / regionsArea: Lifetimes / regionsA-trait-systemArea: Trait systemArea: Trait systemC-bugCategory: This is a bug.Category: This is a bug.P-criticalCritical priorityCritical 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-nightlyPerformance or correctness regression from stable to nightly.Performance or correctness regression from stable to nightly.