Description
When using cargo chef prepare on a project with edition = "2024" in [package], the generated recipe injects edition = "2024" onto each individual target ([[bin]], [lib], [[example]]). This triggers deprecation warnings from Cargo nightly:
warning: /build/crates/mt-tauri/Cargo.toml: `edition` is set on library `mt_lib` which is deprecated
warning: /build/crates/mt-tauri/Cargo.toml: `edition` is set on binary `mt` which is deprecated
warning: /build/crates/mt-tauri/Cargo.toml: `edition` is set on example `audio_test` which is deprecated
Reproduction
Cargo.toml:
[package]
name = "my-crate"
edition = "2024"
[[bin]]
name = "my-bin"
path = "src/main.rs"
[lib]
name = "my_lib"
Run cargo chef prepare --recipe-path recipe.json and inspect the generated manifest — each target gets an explicit edition = "2024" field.
Expected behavior
cargo-chef should not propagate the package-level edition to individual targets, since Cargo 2024 edition inherits it automatically from [package].
Environment
- cargo-chef: 0.1.77
- Rust: nightly-2026-02-09
- edition: 2024
Description
When using
cargo chef prepareon a project withedition = "2024"in[package], the generated recipe injectsedition = "2024"onto each individual target ([[bin]],[lib],[[example]]). This triggers deprecation warnings from Cargo nightly:Reproduction
Cargo.toml:Run
cargo chef prepare --recipe-path recipe.jsonand inspect the generated manifest — each target gets an explicitedition = "2024"field.Expected behavior
cargo-chef should not propagate the package-level
editionto individual targets, since Cargo 2024 edition inherits it automatically from[package].Environment