{"record":{"id":"7ecf1711521411b5","repo":"rust-lang/cargo","slug":"project-is-not-supported-as-of-the-2024-editio","errorCode":null,"errorMessage":"`[project]` is not supported as of the 2024 Edition, please use `[package]`","messagePattern":"`\\[project\\]` is not supported as of the 2024 Edition, please use `\\[package\\]`","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/workspace/parser/mod.rs","lineNumber":1395,"sourceCode":"            ));\n        }\n        default_edition\n    };\n    if !edition.is_stable() {\n        let version = normalized_package\n            .normalized_version()\n            .expect(\"previously normalized\")\n            .map(|v| format!(\"@{v}\"))\n            .unwrap_or_default();\n        let hint = rust_version\n            .as_ref()\n            .map(|rv| format!(\"help: {package_name}{version} requires rust {rv}\"));\n        features.require_with_hint(Feature::unstable_editions(), hint.as_deref())?;\n    }\n\n    if original_toml.project.is_some() {\n        if Edition::Edition2024 <= edition {\n            anyhow::bail!(\n                \"`[project]` is not supported as of the 2024 Edition, please use `[package]`\"\n            );\n        } else {\n            warnings.push(format!(\"`[project]` is deprecated in favor of `[package]`\"));\n        }\n    }\n\n    if normalized_package.metabuild.is_some() {\n        features.require(Feature::metabuild())?;\n    }\n\n    if is_embedded {\n        let manifest::TomlManifest {\n            cargo_features: _,\n            package: _,\n            project: _,\n            badges: _,\n            features: _,","sourceCodeStart":1377,"sourceCodeEnd":1413,"githubUrl":"https://github.com/rust-lang/cargo/blob/98a09e7e7d62850f14e5b6132101fc1edd19a16f/src/workspace/parser/mod.rs#L1377-L1413","documentation":"Thrown when a manifest contains a [project] section and the resolved edition is 2024 or later. Historically [project] was an alias for [package]; as of the 2024 edition it is removed entirely (a hard error). For editions before 2024, the same condition only emits a deprecation warning. The check uses original_toml.project.is_some() and compares Edition::Edition2024 <= edition.","triggerScenarios":"A Cargo.toml with edition = \"2024\" (or unspecified defaulting to 2024) that uses [project] instead of [package]. Triggered during to_real_manifest validation.","commonSituations":"Upgrading a crate's edition to 2024 without renaming [project] to [package]. Very old manifests that predate the [package] standardization. Templates that still emit [project].","solutions":["Rename the [project] section header to [package] in Cargo.toml.","If a tool generated the manifest, update its template to use [package].","Run `cargo fix --edition` to migrate legacy fields when bumping editions."],"exampleFix":"# before\n[project]\nname = \"my-crate\"\nversion = \"0.1.0\"\nedition = \"2024\"\n\n# after\n[package]\nname = \"my-crate\"\nversion = \"0.1.0\"\nedition = \"2024\"","handlingStrategy":"validation","validationCode":"fn check_no_project_section_on_2024(toml: &str) -> Result<(), String> {\n    let v: toml::Value = toml::from_str(toml).map_err(|e| e.to_string())?;\n    let edition = v.get(\"package\").or_else(|| v.get(\"project\"))\n        .and_then(|p| p.get(\"edition\")).and_then(|e| e.as_str())\n        .unwrap_or(\"2015\");\n    if v.get(\"project\").is_some() && edition >= \"2024\" {\n        return Err(\"rename [project] to [package] for edition 2024\".into());\n    }\n    Ok(())\n}","typeGuard":"fn uses_package_not_project(toml: &toml::Value) -> bool {\n    toml.get(\"project\").is_none() || toml.get(\"package\").is_some()\n}","tryCatchPattern":null,"preventionTips":["Always use [package], never [project], in new manifests.","Run `cargo fix --edition` when upgrading to edition 2024.","Audit manifests during edition migration for [project] sections."],"tags":["cargo","manifest","edition-2024","deprecation","package"],"backgroundTag":null,"analyzedSha":"98a09e7e7d62850f14e5b6132101fc1edd19a16f","analyzedAt":"2026-08-11T17:42:36.556Z","contentChangedAt":"2026-08-11T17:42:36.556Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}