File tree 1 file changed +45
-1
lines changed
crates/std_detect/src/detect
1 file changed +45
-1
lines changed Original file line number Diff line number Diff line change 19
19
20
20
use cfg_if:: cfg_if;
21
21
22
+ #[ cfg( not( doc) ) ]
22
23
#[ macro_use]
23
24
mod error_macros;
24
25
25
26
#[ macro_use]
26
27
mod macros;
27
28
28
29
cfg_if ! {
29
- if #[ cfg( any( target_arch = "x86" , target_arch = "x86_64" ) ) ] {
30
+ if #[ cfg( doc) ] {
31
+ // When building docs, emit the full macro for all supported arches.
32
+ #[ allow( dead_code) ]
33
+ mod arch {
34
+ #[ path = "x86.rs" ]
35
+ #[ macro_use]
36
+ mod x86;
37
+ #[ path = "arm.rs" ]
38
+ #[ macro_use]
39
+ mod arm;
40
+ #[ path = "aarch64.rs" ]
41
+ #[ macro_use]
42
+ mod aarch64;
43
+ #[ path = "riscv.rs" ]
44
+ #[ macro_use]
45
+ mod riscv;
46
+ #[ path = "powerpc.rs" ]
47
+ #[ macro_use]
48
+ mod powerpc;
49
+ #[ path = "powerpc64.rs" ]
50
+ #[ macro_use]
51
+ mod powerpc64;
52
+ #[ path = "mips.rs" ]
53
+ #[ macro_use]
54
+ mod mips;
55
+ #[ path = "mips64.rs" ]
56
+ #[ macro_use]
57
+ mod mips64;
58
+
59
+ #[ doc( hidden) ]
60
+ pub ( crate ) enum Feature {
61
+ Null
62
+ }
63
+ #[ doc( hidden) ]
64
+ pub mod __is_feature_detected { }
65
+
66
+ impl Feature {
67
+ #[ doc( hidden) ]
68
+ pub ( crate ) fn from_str( _s: & str ) -> Result <Feature , ( ) > { Err ( ( ) ) }
69
+ #[ doc( hidden) ]
70
+ pub ( crate ) fn to_str( self ) -> & ' static str { "" }
71
+ }
72
+ }
73
+ } else if #[ cfg( any( target_arch = "x86" , target_arch = "x86_64" ) ) ] {
30
74
#[ path = "arch/x86.rs" ]
31
75
#[ macro_use]
32
76
mod arch;
You can’t perform that action at this time.
0 commit comments