Skip to content

Goofy error if I forgot to put quotes around immediate-abortΒ #16449

@saethlin

Description

@saethlin

Problem

I mistakenly tried to use this manifest:

[package]
name = "scratch"
version = "0.1.0"
edition = "2024"

[dependencies]

[profile.release]
panic = immediate-abort

Which (correctly) fails to parse with this (silly) error:

error: invalid float, expected `inf`
 --> Cargo.toml:9:9
  |
9 | panic = immediate-abort
  |         ^^^^^^^^^^^^^^^

I'd rather see a suggestion that I put quotes around the value. The field is supposed to be a String after all. Right? 🀞

cargo 1.94.0-nightly (94c368ad2 2025-12-26)
release: 1.94.0-nightly
commit-hash: 94c368ad2b9db0f0da5bdd8421cea13786ce4412
commit-date: 2025-12-26
host: aarch64-apple-darwin
libgit2: 1.9.1 (sys:0.20.2 vendored)
libcurl: 8.7.1 (sys:0.4.83+curl-8.15.0 system ssl:(SecureTransport) LibreSSL/3.3.6)
ssl: OpenSSL 3.5.4 30 Sep 2025
os: Mac OS 26.2.0 [64-bit]

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-diagnosticsArea: Error and warning messages generated by Cargo itself.A-tomlArea: TOML parsing and handlingC-bugCategory: bugS-blocked-externalStatus: ❌ blocked on something out of the direct control of the Cargo project, e.g., upstream fix

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions