Skip to main content

check_invalid_ws_keys

Function check_invalid_ws_keys 

Source
fn check_invalid_ws_keys(
    toml_key: &str,
    arg: &DepOp,
    edition: Edition,
) -> CargoResult<()>
Expand description

When { workspace = true } you cannot define other keys that configure the source of the dependency such as version, registry, registry-index, path, git, branch, tag, rev, or package. Prior to Edition 2024 (RFC 3945) default-features was also forbidden; from Edition 2024 onwards a package-level default-features overrides the workspace value, so it is allowed.

Only default-features, registry and rename need to be checked for currently. This is because git and its associated keys, path, and version should all bee checked before this is called. rename is checked for as it turns into package