-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Closed
Labels
A-manifestArea: Cargo.toml issuesArea: Cargo.toml issuesA-tomlArea: TOML parsing and handlingArea: TOML parsing and handlingC-feature-requestCategory: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`E-easyExperience: EasyExperience: Easy
Description
Problem
Suppose you have a package with this Cargo.toml
:
[package]
name = "example"
version = "0.1.0"
edition = "2021"
[lib]
proc-macro = false
proc_macro = true
Is the library crate a proc macro crate or not?
It's a little hard to tell. (The answer is no.)
Proposed Solution
Warn when two keys are set that control the same thing.
I don't know if there are other pairs like this but, if there are, they should also warn like "conflicting keys: proc-macro
overwrites proc_macro
".
Notes
I heard about this from @Nemo157 on Discord, as a bit of historical trivial about Cargo. They mentioned that it's caused some problems for users of docs.rs, although I have not encountered this issue personally.
Metadata
Metadata
Assignees
Labels
A-manifestArea: Cargo.toml issuesArea: Cargo.toml issuesA-tomlArea: TOML parsing and handlingArea: TOML parsing and handlingC-feature-requestCategory: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`E-easyExperience: EasyExperience: Easy