Skip to content

Regression while building Deno 2.6.0 #149886

Closed as not planned
Closed as not planned

Description

@Lucy-dot-dot

Example

I tried this code:

cargo install deno --locked

I expected to see this happen: installation success

Instead, this happened: a borrow checker error at the end of compilation in the deno crate

error[E0716]: temporary value dropped while borrowed
   --> /home/user/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/deno-2.6.0/tools/pm/audit.rs:507:16
    |
507 |               &format!("@{}", target)
    |               -^^^^^^^^^^^^^^^^^^^^^-
    |               ||                    |
    |               ||                    temporary value is freed at the end of this statement
    |               |creates a temporary value which is freed while still in use
    |               borrow later used here
    |
    = note: consider using a `let` binding to create a longer lived value
    = note: this error originates in the macro `format` (in Nightly builds, run with -Z macro-backtrace for more info)

For more information about this error, try `rustc --explain E0716`.
error: could not compile `deno` (bin "deno") due to 1 previous error

Version it worked on

It most recently worked on: 1.91.0

Version with regression

rustc --version --verbose:

rustc 1.92.0 (ded5c06cf 2025-12-08)
binary: rustc
commit-hash: ded5c06cf21d2b93bffd5d884aa6e96934ee4234
commit-date: 2025-12-08
host: x86_64-unknown-linux-gnu
release: 1.92.0
LLVM version: 21.1.3

Activity

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

    @cyrgani
    Contributor

    reduction:

    fn find_actions(action: &AuditAction) -> String {
        format!(
            "{} {}",
            action.action,
            if let Some(target) = &action.target {
                &format!("@{}", target)
            } else {
                ""
            },
        )
    }
    pub struct AuditAction {
        pub action: String,
        pub target: Option<String>,
    }

    in 1.91, this emitted the FCW warning: temporary lifetime will be shortened in Rust 1.92. I believe this is the intended breakage from #145838? (@dianne)

  3. dianne commented on Dec 12, 2025

    @dianne
    Member

    This is indeed intended breakage from #145838; it being accepted by the compiler was a bug in earlier Rust versions.

    I'd recommend filing an issue with Deno instead, but looking at the Deno repository, it seems they only support building with a specific Rust toolchain version1; at the moment it's 1.90.02.

    Footnotes

    1. https://github.com/denoland/deno/blob/main/.github/CONTRIBUTING.md#rust ↩

    2. https://github.com/denoland/deno/blob/e8a725f5e9d9237824e79e58984ead0ba534497d/rust-toolchain.toml ↩

  4. removed
    I-prioritizeIssue needs a team member to assess the impact. Will be replaced by P-{low,medium,high,critical}
    on Dec 12, 2025
  5. removed
    needs-triageThis issue may need triage. Remove when done. See docs forge.rust-lang.org/release/issue-triaging
    on Dec 12, 2025
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

    C-bugCategory: This is a bug.regression-untriagedUntriaged performance or correctness regression.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions