Skip to content

regression: temporary value dropped while borrowed #148974

Closed

Description

@Mark-Simulacrum
[INFO] [stdout] error[E0716]: temporary value dropped while borrowed
[INFO] [stdout]   --> src/cmd/pretty_term.rs:81:46
[INFO] [stdout]    |
[INFO] [stdout] 80 | /                     match (v.status().success(), v.status().code()) {
[INFO] [stdout] 81 | |                         (false, Some(c)) => &format!("({c}) "),
[INFO] [stdout]    | |                                              ^^^^^^^^^^^^^^^^-
[INFO] [stdout]    | |                                              |               |
[INFO] [stdout]    | |                                              |               temporary value is freed at the end of this statement
[INFO] [stdout]    | |                                              creates a temporary value which is freed while still in use
[INFO] [stdout] 82 | |                         _ => "",
[INFO] [stdout] 83 | |                     }
[INFO] [stdout]    | |_____________________- borrow later used here
[INFO] [stdout]    |
[INFO] [stdout]    = note: consider using a `let` binding to create a longer lived value
[INFO] [stdout]    = note: this error originates in the macro `format` (in Nightly builds, run with -Z macro-backtrace for more info)

Activity

  1. added
    needs-triageThis issue may need triage. Remove when done. See docs forge.rust-lang.org/release/issue-triaging
    on Nov 15, 2025
  2. added
    I-prioritizeIssue needs a team member to assess the impact. Will be replaced by P-{low,medium,high,critical}
    on Nov 15, 2025
  3. added this to the 1.92.0 milestone on Nov 15, 2025
  4. theemathas commented on Nov 15, 2025

    @theemathas
    Contributor

    I haven't looked at the individual regressions, but this looks like the intended regression from #145838

    See also #148427, which is related.

    cc @dianne

  5. added
    T-langRelevant to the language team
    T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.
    A-fmtArea: `core::fmt`
    and removed
    needs-triageThis issue may need triage. Remove when done. See docs forge.rust-lang.org/release/issue-triaging
    on Nov 15, 2025
  6. dianne commented on Nov 15, 2025

    @dianne
    Member

    These are intended breakage from #145838, yeah. It's unfortunate how many more instances have popped up since the PR's crater run.

  7. Mark-Simulacrum commented on Nov 15, 2025

    @Mark-Simulacrum
    MemberAuthor

    #145838 (comment) seems like the salient comment. The majority of these are github repositories, but it does seem like we at minimum will want to make sure to call this out in release notes (#146274 will take care of that).

  8. theemathas commented on Nov 16, 2025

    @theemathas
    Contributor

    Do we need to open issues/PRs on these repos?

  9. apiraino commented on Nov 27, 2025

    @apiraino
    Contributor

    Do we need to open issues/PRs on these repos?

    Looking at past cases of incoming breaking changes, my understanding is that we don't need to do that and it is generally left to our contributors' deciding if they have time for opening issues or submitting patches in other projects.

  10. removed
    I-prioritizeIssue needs a team member to assess the impact. Will be replaced by P-{low,medium,high,critical}
    on Nov 27, 2025
  11. wesleywiser commented on Dec 11, 2025

    @wesleywiser
    Member

    Closing as intended changes from #145838

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

    A-fmtArea: `core::fmt`A-temporary-lifetime-extensionArea: temporary lifetime extensionF-super_letit's super, let's go!T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.T-langRelevant to the language teamregression-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