-
Notifications
You must be signed in to change notification settings - Fork 12.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Nightly compiler bug: "lifetime mismatch" #94004
Comments
Thanks for the report! Is this a public project you can share? Or perhaps you can put together a minimum reproduction? And perhaps you can narrow down to one specific nightly where it starts happening? |
Seems like this may be related to this PR which was part of Tokio 1.16, although I'm not sure why it the same code would compile on stable and not nightly. |
@ehuss It is broken on nightly-2022-02-13 and nightly-2022-02-15, but works on nightly-2022-02-09. I can not share the repo but I will try to put together reproduction soon. |
Sorry I misunderstood. We tested on nightly 2022-02-12 and it compiles. So something broke on the release on the 13th. |
Sorry again - I thought I was on nightly-2022-02-13 when in reality I was not. It actually appears to be the release on the 14th that broke things. 9th - works |
Considering this regression and the perf regression, we should probably revert and try again in a new PR |
Assigning priority as discussed in the Zulip thread of the Prioritization Working Group. @rustbot label -I-prioritize +P-high |
Revert rust-lang#91403 fixes rust-lang#94004 r? `@pnkfelix` `@cjgillot`
I have a standalone repro of something that builds on nightly-2022-02-13, fails on nightly-2022-02-14 as well. I'm not sure if it's the same bug. playground use core::future::Future;
trait Callback<'a> {}
impl<'a, T, Fut> Callback<'a> for T
where
T: FnOnce(&'a mut ()) -> Fut,
Fut: Future<Output = ()> + 'a,
{
}
async fn transaction<Cb>(f: Cb)
where
Cb: for<'a> Callback<'a>,
{
}
async fn my_callback(bus: &mut ()) {}
async fn boom() {
transaction(my_callback).await;
}
|
Revert rust-lang#91403 fixes rust-lang#94004 r? `@pnkfelix` `@cjgillot`
Nightly 2022-02-13 seems to have introduced a bug. Code that compiles properly on stable and nightly-2022-02-09 does not compile with nightly-2022-02-13:
The text was updated successfully, but these errors were encountered: