about summary refs log tree commit diff
diff options
context:
space:
mode:
authorLukas Wirth <lukastw97@gmail.com>2023-09-29 17:52:05 +0200
committerLukas Wirth <lukastw97@gmail.com>2023-10-02 21:31:16 +0200
commit67e5eb6cec42b7b13e93bdb57e2d9f3a0b710d6f (patch)
treec8d0bc975975d30f0e56d66e0fc3af1842957d72
parente8a2673159f69be298287328a24e17e3ed1da5f0 (diff)
downloadrust-67e5eb6cec42b7b13e93bdb57e2d9f3a0b710d6f.tar.gz
rust-67e5eb6cec42b7b13e93bdb57e2d9f3a0b710d6f.zip
Cfg out ReprOption::field_shuffle_seed
-rw-r--r--compiler/rustc_abi/src/lib.rs6
1 files changed, 2 insertions, 4 deletions
diff --git a/compiler/rustc_abi/src/lib.rs b/compiler/rustc_abi/src/lib.rs
index 6107a2f0b2a..d4914487efd 100644
--- a/compiler/rustc_abi/src/lib.rs
+++ b/compiler/rustc_abi/src/lib.rs
@@ -1,5 +1,3 @@
-// We want to be able to build this crate with a stable compiler, so no
-// `#![feature]` attributes should be added.
 #![cfg_attr(feature = "nightly", feature(step_trait, rustc_attrs, min_specialization))]
 #![cfg_attr(feature = "nightly", allow(internal_features))]
 
@@ -11,7 +9,6 @@ use std::ops::{Add, AddAssign, Mul, RangeInclusive, Sub};
 use std::str::FromStr;
 
 use bitflags::bitflags;
-use rustc_data_structures::stable_hasher::Hash64;
 #[cfg(feature = "nightly")]
 use rustc_data_structures::stable_hasher::StableOrd;
 use rustc_index::{Idx, IndexSlice, IndexVec};
@@ -76,6 +73,7 @@ pub struct ReprOptions {
     pub align: Option<Align>,
     pub pack: Option<Align>,
     pub flags: ReprFlags,
+    #[cfg(feature = "randomize")]
     /// The seed to be used for randomizing a type's layout
     ///
     /// Note: This could technically be a `Hash128` which would
@@ -83,7 +81,7 @@ pub struct ReprOptions {
     /// hash without loss, but it does pay the price of being larger.
     /// Everything's a tradeoff, a 64-bit seed should be sufficient for our
     /// purposes (primarily `-Z randomize-layout`)
-    pub field_shuffle_seed: Hash64,
+    pub field_shuffle_seed: rustc_data_structures::stable_hasher::Hash64,
 }
 
 impl ReprOptions {