-
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
regression: parameter type may not live long enough #97607
Comments
Bisectedsearched nightlies: from nightly-2022-04-01 to nightly-2022-05-31 bisected with cargo-bisect-rustc v0.6.3Host triple: x86_64-unknown-linux-gnu cargo bisect-rustc --start=2022-04-01 --end=2022-05-31 Minimizedfn test<T, F, U>(f: F) -> Box<dyn Fn(T) -> U + 'static>
where
F: 'static + Fn(T) -> U,
for<'a> U: 'a, // < This is the problematic line -- remove it, and it passes.
{
Box::new(move |t| f(t))
} |
The issue is that Regarding the diagnostics being weird, the issue is probably because we don't handle the case where a higher-ranked lifetime doesn't outlive itself. We just see a borrowck error, see that it's due to the binder's |
Assigning priority as discussed in the Zulip thread of the Prioritization Working Group. @rustbot label -I-prioritize +P-medium |
…k, r=compiler-errors Revert "Check that closures satisfy their where bounds" This reverts commit 253408b from rust-lang#96899 This is only performed on beta to give us another few weeks to fix rust-lang#97607 on nightly. The planned fix is likely way too large to backport anyway. r? `@compiler-errors`
This got fixed on nightly by enabling nll by default |
@rustbot claim |
…, r=compiler-errors Add test for issue 97607 Fixes rust-lang#97607 r? `@compiler-errors` Not sure which UI test dir to put this under, kindly let me know of a better dir if necessary and I will change it. Thanks.
See https://crater-reports.s3.amazonaws.com/beta-1.62-1/beta-2022-05-20/gh/FSMaxB.rust-genealogy/log.txt:
This is a 1.62 regression, it seems, based on Crater. At the very least, it's a diagnostics issue that we're suggesting adding an already existing lifetime bound.
The text was updated successfully, but these errors were encountered: