This repository was archived by the owner on May 28, 2025. It is now read-only.
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 11use crate :: common:: { CompareMode , Config , Debugger } ;
22use std:: collections:: HashSet ;
33
4+ const EXTRA_ARCHS : & [ & str ] = & [ "asmjs" , "spirv" ] ;
5+
46/// Parses a name-value directive which contains config-specific information, e.g., `ignore-x86`
57/// or `normalize-stderr-32bit`.
68pub ( super ) fn parse_cfg_name_directive < ' a > (
@@ -99,7 +101,7 @@ pub(super) fn parse_cfg_name_directive<'a>(
99101 }
100102 condition ! {
101103 name: & target_cfg. arch,
102- allowed_names: & target_cfgs. all_archs,
104+ allowed_names: ContainsEither { a : & target_cfgs. all_archs, b : & EXTRA_ARCHS } ,
103105 message: "when the architecture is {name}"
104106 }
105107 condition ! {
@@ -257,3 +259,14 @@ impl<T: CustomContains> CustomContains for ContainsPrefixed<T> {
257259 }
258260 }
259261}
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