Skip to content

Commit 66ce16c

Browse files
committed
fix(toml)!: Disallow [lints] in virtual workspaces
This was missed with the initial `[lints]` implementation. While this is a breaking change, this is aligned with ones we've done in the past. A lot of times, we warn first. My hope is that isn't needed this time because - It only exists virtual workspaces so they aren't published - It is a nop to have this which is likely to be caught - This is so new that the number of people using it, and likely running into this case, is quite low.
1 parent 047dc18 commit 66ce16c

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

src/cargo/util/toml/mod.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1122,6 +1122,9 @@ fn to_virtual_manifest(
11221122
if me.badges.is_some() {
11231123
bail!("this virtual manifest specifies a [badges] section, which is not allowed");
11241124
}
1125+
if me.lints.is_some() {
1126+
bail!("this virtual manifest specifies a [lints] section, which is not allowed");
1127+
}
11251128

11261129
let mut nested_paths = Vec::new();
11271130
let mut warnings = Vec::new();

tests/testsuite/workspaces.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2198,6 +2198,7 @@ fn ws_err_unused() {
21982198
"[features]",
21992199
"[target]",
22002200
"[badges]",
2201+
"[lints]",
22012202
] {
22022203
let p = project()
22032204
.file(

0 commit comments

Comments
 (0)