Skip to content

Commit a08a1a3

Browse files
committed
toml: be less stringent on 'debug' profile, we already emit a warning on it
1 parent 3307176 commit a08a1a3

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/cargo/util/toml/mod.rs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -536,9 +536,16 @@ impl TomlProfile {
536536
}
537537

538538
match name {
539-
"package" | "build" | "debug" => {
539+
"package" | "build" => {
540540
failure::bail!("Invalid {}: `{}`", what, name);
541541
}
542+
"debug" if what == "profile" => {
543+
if what == "profile name" {
544+
// Allowed, but will emit warnings
545+
} else {
546+
failure::bail!("Invalid {}: `{}`", what, name);
547+
}
548+
}
542549
"doc" if what == "dir-name" => {
543550
failure::bail!("Invalid {}: `{}`", what, name);
544551
}

0 commit comments

Comments
 (0)