File tree Expand file tree Collapse file tree 1 file changed +45
-1
lines changed
crates/std_detect/src/detect Expand file tree Collapse file tree 1 file changed +45
-1
lines changed Original file line number Diff line number Diff line change 1919
2020use cfg_if:: cfg_if;
2121
22+ #[ cfg( not( doc) ) ]
2223#[ macro_use]
2324mod error_macros;
2425
2526#[ macro_use]
2627mod macros;
2728
2829cfg_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" ) ) ] {
3074 #[ path = "arch/x86.rs" ]
3175 #[ macro_use]
3276 mod arch;
You can’t perform that action at this time.
0 commit comments