From 67e5eb6cec42b7b13e93bdb57e2d9f3a0b710d6f Mon Sep 17 00:00:00 2001 From: Lukas Wirth Date: Fri, 29 Sep 2023 17:52:05 +0200 Subject: [PATCH] Cfg out ReprOption::field_shuffle_seed --- compiler/rustc_abi/src/lib.rs | 6 ++---- 1 file 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, pub pack: Option, 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 {