Skip to content
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 #121603

Closed
Mark-Simulacrum opened this issue Feb 25, 2024 · 4 comments
Closed

regression: parameter type may not live long enough #121603

Mark-Simulacrum opened this issue Feb 25, 2024 · 4 comments
Labels
P-critical Critical priority regression-from-stable-to-beta Performance or correctness regression from stable to beta. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Milestone

Comments

@Mark-Simulacrum
Copy link
Member

Mark-Simulacrum commented Feb 25, 2024

[INFO] [stdout] error[E0309]: the parameter type `G` may not live long enough
[INFO] [stdout]    --> src/adapters/intersperse.rs:135:17
[INFO] [stdout]     |
[INFO] [stdout] 125 | impl<'this, L, G> Lender for IntersperseWith<'this, L, G>
[INFO] [stdout]     |      ----- the parameter type `G` must be valid for the lifetime `'this` as defined here...
[INFO] [stdout] ...
[INFO] [stdout] 135 |                 core::mem::transmute::<<Self as Lending<'this>>::Lend, <Self as Lending<'_>>::Lend>((self.separator)())
[INFO] [stdout]     |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ...so that the type `G` will meet its required lifetime bounds
[INFO] [stdout]     |
[INFO] [stdout] help: consider adding an explicit lifetime bound
[INFO] [stdout]     |
[INFO] [stdout] 128 |     G: FnMut() -> <L as Lending<'this>>::Lend + 'this,
[INFO] [stdout]     |                                               +++++++
[INFO] [stdout] 
@Mark-Simulacrum Mark-Simulacrum added T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. regression-from-stable-to-beta Performance or correctness regression from stable to beta. labels Feb 25, 2024
@Mark-Simulacrum Mark-Simulacrum added this to the 1.77.0 milestone Feb 25, 2024
@rustbot rustbot added I-prioritize Issue: Indicates that prioritization has been requested for this issue. needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. labels Feb 25, 2024
@Mark-Simulacrum Mark-Simulacrum added E-needs-bisection Call for participation: This issue needs bisection: https://github.com/rust-lang/cargo-bisect-rustc E-needs-mcve Call for participation: This issue has a repro, but needs a Minimal Complete and Verifiable Example labels Feb 25, 2024
@compiler-errors
Copy link
Member

I believe this is a mixture of regressions from #120019 (at least the advent-of-code repo is due to this) and #118553 (which I assume the bulk of the remaining crates are due to that).

cc @lcnr @jackh726 for your respective PRs

@apiraino
Copy link
Contributor

WG-prioritization assigning priority (Zulip discussion).

@rustbot label -I-prioritize +P-critical

@rustbot rustbot added P-critical Critical priority and removed I-prioritize Issue: Indicates that prioritization has been requested for this issue. labels Feb 26, 2024
@lcnr
Copy link
Contributor

lcnr commented Feb 26, 2024

going to look at all of them now, believe them to be intended

@lcnr
Copy link
Contributor

lcnr commented Feb 26, 2024

lender https://crates.io/crates/lender

affected version 0.2.1, fixed by @aliemjay in WanderLanz/Lender#4 with new version released afaict

actix-mqtt-client https://crates.io/crates/actix-mqtt-client

affected version 0.5.0, fixed by @jackh726 in Syndim/actix-mqtt-client#14, no new release yet

dependencies

sod https://crates.io/crates/sod

affected version 0.3.2, fixed by @jackh726 in thill/sod#1, not yet merged

dependencies

https://github.com/zyansheep/advent-of-code-rust

depends on lender-0.2.1, fixed by updating the Cargo.toml file.

milvus https://crates.io/crates/milvus

affected version 0.2.0, minimized

Actually unsure which PR fixed this :thinking_face: This previous behavior was unsound? Anyways, opened andreytkachenko/milvus-rs#1

Asked on zulip for help bisecting this: https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/help.20bisecting.20unknown.20soundness.20fix


I consider all of these changes to be intended breakage, closing this. cc @rust-lang/types

@lcnr lcnr closed this as completed Feb 26, 2024
@fmease fmease removed the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Feb 29, 2024
@apiraino apiraino removed E-needs-bisection Call for participation: This issue needs bisection: https://github.com/rust-lang/cargo-bisect-rustc E-needs-mcve Call for participation: This issue has a repro, but needs a Minimal Complete and Verifiable Example labels Mar 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P-critical Critical priority regression-from-stable-to-beta Performance or correctness regression from stable to beta. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

6 participants