diff options
| author | hkalbasi <hamidrezakalbasi@protonmail.com> | 2022-10-28 18:45:55 +0330 |
|---|---|---|
| committer | hkalbasi <hamidrezakalbasi@protonmail.com> | 2022-11-24 16:26:12 +0330 |
| commit | 09a384643ee4188fd1e837ab25856a7e8ff62d07 (patch) | |
| tree | 19e82633eeffe94899549fb59b84f16ab0eb91f9 /compiler/rustc_target/src/lib.rs | |
| parent | 1dda298ad39a64e019a3511139c5b13ac0a18e54 (diff) | |
| download | rust-09a384643ee4188fd1e837ab25856a7e8ff62d07.tar.gz rust-09a384643ee4188fd1e837ab25856a7e8ff62d07.zip | |
make rustc_target usable outside of rustc
Diffstat (limited to 'compiler/rustc_target/src/lib.rs')
| -rw-r--r-- | compiler/rustc_target/src/lib.rs | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/compiler/rustc_target/src/lib.rs b/compiler/rustc_target/src/lib.rs index aaba0d7f093..1065980a26a 100644 --- a/compiler/rustc_target/src/lib.rs +++ b/compiler/rustc_target/src/lib.rs @@ -8,13 +8,13 @@ //! LLVM. #![doc(html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/")] -#![feature(assert_matches)] -#![feature(associated_type_bounds)] -#![feature(exhaustive_patterns)] -#![feature(min_specialization)] -#![feature(never_type)] -#![feature(rustc_attrs)] -#![feature(step_trait)] +#![cfg_attr(feature = "nightly", feature(assert_matches))] +#![cfg_attr(feature = "nightly", feature(associated_type_bounds))] +#![cfg_attr(feature = "nightly", feature(exhaustive_patterns))] +#![cfg_attr(feature = "nightly", feature(min_specialization))] +#![cfg_attr(feature = "nightly", feature(never_type))] +#![cfg_attr(feature = "nightly", feature(rustc_attrs))] +#![cfg_attr(feature = "nightly", feature(step_trait))] #![deny(rustc::untranslatable_diagnostic)] #![deny(rustc::diagnostic_outside_of_impl)] @@ -22,14 +22,18 @@ use std::iter::FromIterator; use std::path::{Path, PathBuf}; #[macro_use] +#[cfg(feature = "nightly")] extern crate rustc_macros; #[macro_use] +#[cfg(feature = "nightly")] extern crate tracing; pub mod abi; +#[cfg(feature = "nightly")] pub mod asm; pub mod json; +#[cfg(feature = "nightly")] pub mod spec; #[cfg(test)] |
