{"record":{"id":"e3f199f3bb3b1dbe","repo":"rust-lang/cargo","slug":"not-implemented-e3f199","errorCode":null,"errorMessage":"not implemented","messagePattern":"not implemented","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/resolver/features.rs","lineNumber":189,"sourceCode":"        ws: &Workspace<'_>,\n        has_dev_units: HasDevUnits,\n        force_all_targets: ForceAllTargets,\n    ) -> CargoResult<FeatureOpts> {\n        let mut opts = FeatureOpts::default();\n        let unstable_flags = ws.gctx().cli_unstable();\n        let mut enable = |feat_opts: &Vec<String>| {\n            for opt in feat_opts {\n                match opt.as_ref() {\n                    \"build_dep\" | \"host_dep\" => opts.decouple_host_deps = true,\n                    \"dev_dep\" => opts.decouple_dev_deps = true,\n                    \"itarget\" => opts.ignore_inactive_targets = true,\n                    \"all\" => {\n                        opts.decouple_host_deps = true;\n                        opts.decouple_dev_deps = true;\n                        opts.ignore_inactive_targets = true;\n                    }\n                    \"compare\" => opts.compare = true,\n                    \"ws\" => unimplemented!(),\n                    s => bail!(\"-Zfeatures flag `{}` is not supported\", s),\n                }\n            }\n            Ok(())\n        };\n        if let Some(feat_opts) = unstable_flags.features.as_ref() {\n            enable(feat_opts)?;\n        }\n        match ws.resolve_behavior() {\n            ResolveBehavior::V1 => {}\n            ResolveBehavior::V2 | ResolveBehavior::V3 => {\n                enable(&vec![\"all\".to_string()]).unwrap();\n            }\n        }\n        if let HasDevUnits::Yes = has_dev_units {\n            // Dev deps cannot be decoupled when they are in use.\n            opts.decouple_dev_deps = false;\n        }","sourceCodeStart":171,"sourceCodeEnd":207,"githubUrl":"https://github.com/rust-lang/cargo/blob/42eee92bc9aa4449f4e25d84e4ceb1cf8e0f87f9/src/resolver/features.rs#L171-L207","documentation":"Cargo's new feature resolver (enabled via -Z features) supports several sub-flags (build_dep, host_dep, dev_dep, itarget, all, compare). The 'ws' (workspace-unified feature resolution) sub-flag is declared in the match but not yet implemented, so it triggers unimplemented!(). This is nightly-only unstable functionality.","triggerScenarios":"Invoking Cargo with `-Z features=ws` on a nightly toolchain. FeatureOpts::new matches the 'ws' token and panics. Note: because this runs inside the resolver, the panic surfaces as a crash rather than a clean error.","commonSituations":"Experimenting with unstable Cargo feature flags; copy-pasting a flag list that includes 'ws' from docs/PRs; CI on nightly where 'ws' was advertised but not stabilized.","solutions":["Remove 'ws' from the -Z features value (use combinations of build_dep/host_dep/dev_dep/itarget/all/compare instead).","Use the stabilized resolver v2/v3 (resolver = \"2\"/\"3\" in Cargo.toml) which enables 'all' automatically, instead of the unstable 'ws' flag.","Upgrade or downgrade nightly to a version where 'ws' is implemented, if applicable."],"exampleFix":"// before\n\"ws\" => unimplemented!(),\n// after (user side)\n// cargo build -Z features=ws   -> remove\n// cargo build -Z features=all","handlingStrategy":"validation","validationCode":"// Validate the -Z features value before running Cargo\nlet allowed = [\"build_dep\",\"host_dep\",\"dev_dep\",\"itarget\",\"all\",\"compare\"];\nfor f in features_value.split(',') {\n    if !allowed.contains(&f) {\n        eprintln!(\"flag `{f}` is not implemented; remove it (notably 'ws')\");\n    }\n}","typeGuard":"null","tryCatchPattern":"null","preventionTips":["Never include 'ws' in -Z features; it is unimplemented.","Prefer stabilized resolver v2/v3 over unstable -Z features flags.","Pin nightly versions in CI and test flag combinations."],"tags":["cargo","features","unstable","resolver","nightly"],"backgroundTag":null,"analyzedSha":"42eee92bc9aa4449f4e25d84e4ceb1cf8e0f87f9","analyzedAt":"2026-08-11T17:42:36.556Z","contentChangedAt":"2026-08-11T17:42:36.556Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}