File tree Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -54,21 +54,25 @@ impl Profiles {
54
54
BTreeMap :: new ( )
55
55
} ;
56
56
57
- // Feature gating
57
+ // Feature gating and name validation
58
58
for ( profile_name, profile) in & profiles {
59
59
match profile_name. as_str ( ) {
60
60
"dev" | "release" | "bench" | "test" | "doc" | "check" => {
61
- if profile. dir_name . is_some ( ) {
62
- features. require ( Feature :: named_profiles ( ) ) ?;
63
- break ;
64
- }
65
-
66
61
match & profile. dir_name {
67
62
None => { }
68
63
Some ( dir_name) => {
64
+ features. require ( Feature :: named_profiles ( ) ) ?;
69
65
validate_name ( & dir_name, "dir-name" ) ?;
70
66
}
71
67
}
68
+
69
+ match & profile. inherits {
70
+ None => { }
71
+ Some ( inherits) => {
72
+ features. require ( Feature :: named_profiles ( ) ) ?;
73
+ validate_name ( & inherits, "inherits" ) ?;
74
+ }
75
+ }
72
76
}
73
77
_ => {
74
78
features. require ( Feature :: named_profiles ( ) ) ?;
You can’t perform that action at this time.
0 commit comments