Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
compiler: narrow scope of nightly cfg in rustc_abi
  • Loading branch information
workingjubilee committed Feb 12, 2025
commit d9c7abba55762f7ec25fc1d9a322f26896381e4f
3 changes: 2 additions & 1 deletion compiler/rustc_abi/src/extern_abi.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
use std::fmt;

#[cfg(feature = "nightly")]
use rustc_macros::{Decodable, Encodable, HashStable_Generic};

#[cfg(test)]
Expand All @@ -8,7 +9,7 @@ mod tests;
use ExternAbi as Abi;

#[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 {
// 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
Expand Down
6 changes: 1 addition & 5 deletions compiler/rustc_abi/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,20 +52,16 @@ use bitflags::bitflags;
use rustc_data_structures::stable_hasher::StableOrd;
use rustc_index::{Idx, IndexSlice, IndexVec};
#[cfg(feature = "nightly")]
use rustc_macros::HashStable_Generic;
#[cfg(feature = "nightly")]
use rustc_macros::{Decodable_Generic, Encodable_Generic};
use rustc_macros::{Decodable_Generic, Encodable_Generic, HashStable_Generic};

mod callconv;
mod layout;
#[cfg(test)]
mod tests;

#[cfg(feature = "nightly")]
mod extern_abi;

pub use callconv::{Heterogeneous, HomogeneousAggregate, Reg, RegKind};
#[cfg(feature = "nightly")]
pub use extern_abi::{AbiDatas, AbiUnsupported, ExternAbi, all_names, lookup};
#[cfg(feature = "nightly")]
pub use layout::{FIRST_VARIANT, FieldIdx, Layout, TyAbiInterface, TyAndLayout, VariantIdx};
Expand Down