File tree Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change 1
1
use crate :: common:: { CompareMode , Config , Debugger } ;
2
2
use std:: collections:: HashSet ;
3
3
4
+ const EXTRA_ARCHS : & [ & str ] = & [ "asmjs" , "spirv" ] ;
5
+
4
6
/// Parses a name-value directive which contains config-specific information, e.g., `ignore-x86`
5
7
/// or `normalize-stderr-32bit`.
6
8
pub ( super ) fn parse_cfg_name_directive < ' a > (
@@ -99,7 +101,7 @@ pub(super) fn parse_cfg_name_directive<'a>(
99
101
}
100
102
condition ! {
101
103
name: & target_cfg. arch,
102
- allowed_names: & target_cfgs. all_archs,
104
+ allowed_names: ContainsEither { a : & target_cfgs. all_archs, b : & EXTRA_ARCHS } ,
103
105
message: "when the architecture is {name}"
104
106
}
105
107
condition ! {
@@ -257,3 +259,14 @@ impl<T: CustomContains> CustomContains for ContainsPrefixed<T> {
257
259
}
258
260
}
259
261
}
262
+
263
+ struct ContainsEither < ' a , A : CustomContains , B : CustomContains > {
264
+ a : & ' a A ,
265
+ b : & ' a B ,
266
+ }
267
+
268
+ impl < A : CustomContains , B : CustomContains > CustomContains for ContainsEither < ' _ , A , B > {
269
+ fn custom_contains ( & self , item : & str ) -> bool {
270
+ self . a . custom_contains ( item) || self . b . custom_contains ( item)
271
+ }
272
+ }
You can’t perform that action at this time.
0 commit comments