Skip to content

Commit 97035e2

Browse files
committed
TomlProfile::validate_name: disallow a 'doc' dir-name
1 parent 5eef815 commit 97035e2

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/cargo/util/toml/mod.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -479,7 +479,7 @@ impl TomlProfile {
479479
features.require(Feature::named_profiles())?;
480480
}
481481

482-
if self.dir_name.is_some() {
482+
if self.dir_name.is_some() {
483483
features.require(Feature::named_profiles())?;
484484
}
485485

@@ -536,6 +536,9 @@ impl TomlProfile {
536536
"package" | "build" | "debug" => {
537537
failure::bail!("Invalid {}: `{}`", what, name);
538538
}
539+
"doc" if what == "dir-name" => {
540+
failure::bail!("Invalid {}: `{}`", what, name);
541+
}
539542
_ => {}
540543
}
541544

0 commit comments

Comments
 (0)