-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
Incremental compilation bug with async fn method capturing multiple lifetimes #98890
Copy link
Copy link
Closed
Closed
Copy link
Labels
C-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-stablePerformance or correctness regression from one stable version to another.Performance or correctness regression from one stable version to another.
Metadata
Metadata
Assignees
Labels
C-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-stablePerformance or correctness regression from one stable version to another.Performance or correctness regression from one stable version to another.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Regression since
1.62.0The following diff:
struct Foo; impl Foo { async fn f(&self, _: &&()) -> &() { &() } } + enum Bar {}if done in between
cargo checks, makes the second check fail with:To reproduce, the following snippet fails on the Playground:
I've reported it over #96655 to avoid defining a duplicate issue, but now that I've noticed it's a regression, I prefer to risk it being a dup than it going unnoticed.
I've also mentioned this over: https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/incremental.20bug.20with.20async.20fns.20and.20lifetimes
Context
This is causing major breakage with users of
async-graphqlwho have switched to Rust1.62.0or up, as showcased by:SimpleObject: error: lifetime may not live long enough async-graphql/async-graphql#900
https://discord.com/channels/273534239310479360/993456385448751124/993456385448751124
@rustbot modify labels: +regression-from-stable-to-stable -regression-untriaged