Skip to content

regression: parameter type may not live long enough #121603

Closed

Description

@Mark-Simulacrum
[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] 

Activity

  1. added
    T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.
    on Feb 25, 2024
  2. added this to the 1.77.0 milestone on Feb 25, 2024
  3. added
    I-prioritizeIssue needs a team member to assess the impact. Will be replaced by P-{low,medium,high,critical}
    needs-triageThis issue may need triage. Remove when done. See docs forge.rust-lang.org/release/issue-triaging
    on Feb 25, 2024
  4. added
    E-needs-bisectionCall for participation: This issue needs bisection: https://github.com/rust-lang/cargo-bisect-rustc
    E-needs-mcveCall for participation: This issue has a repro, but needs a Minimal Complete and Verifiable Example
    on Feb 25, 2024
  5. compiler-errors commented on Feb 26, 2024

    @compiler-errors
    Contributor

    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

  6. apiraino commented on Feb 26, 2024

    @apiraino
    Contributor

    WG-prioritization assigning priority (Zulip discussion).

    @rustbot label -I-prioritize +P-critical

  7. added and removed
    I-prioritizeIssue needs a team member to assess the impact. Will be replaced by P-{low,medium,high,critical}
    on Feb 26, 2024
  8. lcnr commented on Feb 26, 2024

    @lcnr
    Contributor

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

  9. lcnr commented on Feb 26, 2024

    @lcnr
    Contributor

    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 https://github.com/andreytkachenko/milvus-rs/pull/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

  10. removed
    needs-triageThis issue may need triage. Remove when done. See docs forge.rust-lang.org/release/issue-triaging
    on Feb 29, 2024
  11. removed
    E-needs-bisectionCall for participation: This issue needs bisection: https://github.com/rust-lang/cargo-bisect-rustc
    E-needs-mcveCall for participation: This issue has a repro, but needs a Minimal Complete and Verifiable Example
    on Mar 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P-criticalCritical priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.regression-from-stable-to-betaPerformance or correctness regression from stable to beta.

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions