Skip to content

Workspace inherited fields are not warned on stable #10586

Closed
@ehuss

Description

@ehuss

Problem

It looks like the inheritable fields as part of RFC 2906 (#8415) are no longer generating warnings. These warnings are important, as some users get confused and place the fields in the wrong section. If the warnings aren't displayed, then they won't have an indicator of what is wrong. This is particularly problematic for the edition field which quite a few people have tried to set in the workspace.

cc @Muscraft

Steps

Have a workspace such as:

[workspace]
edition = "2021"
[package]
name = "foo"
version = "0.1.0"

Possible Solution(s)

If cargo-features = ["workspace-inheritance"] is not included, then it should generate a warning perhaps similar to:

warning: /path/to/Cargo.toml: unused manifest key: workspace.edition

Notes

No response

Version

cargo 1.62.0-nightly (e2e2dddeb 2022-04-05)
release: 1.62.0-nightly
commit-hash: e2e2dddebe66dfc1403a312653557e332445308b
commit-date: 2022-04-05
host: x86_64-apple-darwin
libgit2: 1.4.2 (sys:0.14.2 vendored)
libcurl: 7.79.1 (sys:0.4.51+curl-7.80.0 system ssl:(SecureTransport) LibreSSL/3.3.5)
os: Mac OS 12.3.1 [64-bit]

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions