-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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 #123280
Comments
searched toolchains b6d2d84 through 7d3702e Regression in 09bc67b Attempting to search unrolled perf builds searched nightlies: from nightly-2024-02-01 to nightly-2024-04-01 bisected with cargo-bisect-rustc v0.6.8Host triple: x86_64-unknown-linux-gnu cargo bisect-rustc --start=2024-02-01 |
This is expected. This is the culprit bound: Minimized: struct WorkerPool<D: 'static>(Option<D>);
fn new_worker_pool<D>() -> impl Sized {
async {
WorkerPool(None::<D>)
}
} What is annoying though is the error span which points to the entire async block because, when inside the async block, we draw implied bounds from its output type, allowing us to assume |
Ironically, this is accepted now and since forever because the rvalue never get the chance to be checked for well-formedness: struct WorkerPool<D: 'static>(Option<D>);
fn new_worker_pool<D>() {
let _ = async {
WorkerPool(None::<D>)
};
} |
Upstream fix is shishanyue/RW-RJR-Server#13 |
closing as expected and we have provided a PR to fix the issue |
added a comment to #121679 (comment) |
Smells similar to #123279, but maybe not.
The text was updated successfully, but these errors were encountered: