compiler: narrow scope of nightly cfg in rustc_abi
This commit is contained in:
parent
34a5ea911c
commit
d9c7abba55
2 changed files with 3 additions and 6 deletions
|
@ -1,5 +1,6 @@
|
||||||
use std::fmt;
|
use std::fmt;
|
||||||
|
|
||||||
|
#[cfg(feature = "nightly")]
|
||||||
use rustc_macros::{Decodable, Encodable, HashStable_Generic};
|
use rustc_macros::{Decodable, Encodable, HashStable_Generic};
|
||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
|
@ -8,7 +9,7 @@ mod tests;
|
||||||
use ExternAbi as Abi;
|
use ExternAbi as Abi;
|
||||||
|
|
||||||
#[derive(PartialEq, Eq, PartialOrd, Ord, Hash, Clone, Copy, Debug)]
|
#[derive(PartialEq, Eq, PartialOrd, Ord, Hash, Clone, Copy, Debug)]
|
||||||
#[derive(HashStable_Generic, Encodable, Decodable)]
|
#[cfg_attr(feature = "nightly", derive(HashStable_Generic, Encodable, Decodable))]
|
||||||
pub enum ExternAbi {
|
pub enum ExternAbi {
|
||||||
// Some of the ABIs come first because every time we add a new ABI, we have to re-bless all the
|
// Some of the ABIs come first because every time we add a new ABI, we have to re-bless all the
|
||||||
// hashing tests. These are used in many places, so giving them stable values reduces test
|
// hashing tests. These are used in many places, so giving them stable values reduces test
|
||||||
|
|
|
@ -52,20 +52,16 @@ use bitflags::bitflags;
|
||||||
use rustc_data_structures::stable_hasher::StableOrd;
|
use rustc_data_structures::stable_hasher::StableOrd;
|
||||||
use rustc_index::{Idx, IndexSlice, IndexVec};
|
use rustc_index::{Idx, IndexSlice, IndexVec};
|
||||||
#[cfg(feature = "nightly")]
|
#[cfg(feature = "nightly")]
|
||||||
use rustc_macros::HashStable_Generic;
|
use rustc_macros::{Decodable_Generic, Encodable_Generic, HashStable_Generic};
|
||||||
#[cfg(feature = "nightly")]
|
|
||||||
use rustc_macros::{Decodable_Generic, Encodable_Generic};
|
|
||||||
|
|
||||||
mod callconv;
|
mod callconv;
|
||||||
mod layout;
|
mod layout;
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod tests;
|
mod tests;
|
||||||
|
|
||||||
#[cfg(feature = "nightly")]
|
|
||||||
mod extern_abi;
|
mod extern_abi;
|
||||||
|
|
||||||
pub use callconv::{Heterogeneous, HomogeneousAggregate, Reg, RegKind};
|
pub use callconv::{Heterogeneous, HomogeneousAggregate, Reg, RegKind};
|
||||||
#[cfg(feature = "nightly")]
|
|
||||||
pub use extern_abi::{AbiDatas, AbiUnsupported, ExternAbi, all_names, lookup};
|
pub use extern_abi::{AbiDatas, AbiUnsupported, ExternAbi, all_names, lookup};
|
||||||
#[cfg(feature = "nightly")]
|
#[cfg(feature = "nightly")]
|
||||||
pub use layout::{FIRST_VARIANT, FieldIdx, Layout, TyAbiInterface, TyAndLayout, VariantIdx};
|
pub use layout::{FIRST_VARIANT, FieldIdx, Layout, TyAbiInterface, TyAndLayout, VariantIdx};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue