]> git.lizzy.rs Git - rust.git/blob - src/tools/rustfmt/tests/target/cfg_if/detect/os/linux/mod.rs
Add 'src/tools/rustfmt/' from commit '7872306edf2e11a69aaffb9434088fd66b46a863'
[rust.git] / src / tools / rustfmt / tests / target / cfg_if / detect / os / linux / mod.rs
1 //! Run-time feature detection on Linux
2
3 mod auxvec;
4
5 #[cfg(feature = "std_detect_file_io")]
6 mod cpuinfo;
7
8 cfg_if! {
9     if #[cfg(target_arch = "aarch64")] {
10         mod aarch64;
11         pub use self::aarch64::check_for;
12     } else if #[cfg(target_arch = "arm")] {
13         mod arm;
14         pub use self::arm::check_for;
15     } else  if #[cfg(any(target_arch = "mips", target_arch = "mips64"))] {
16         mod mips;
17         pub use self::mips::check_for;
18     } else if #[cfg(any(target_arch = "powerpc", target_arch = "powerpc64"))] {
19         mod powerpc;
20         pub use self::powerpc::check_for;
21     } else {
22         use crate::detect::Feature;
23         /// Performs run-time feature detection.
24         pub fn check_for(_x: Feature) -> bool {
25             false
26         }
27     }
28 }