1- // We want to be able to build this crate with a stable compiler, so no
2- // `#![feature]` attributes should be added.
31#![ cfg_attr( feature = "nightly" , feature( step_trait, rustc_attrs, min_specialization) ) ]
42#![ cfg_attr( feature = "nightly" , allow( internal_features) ) ]
53
@@ -11,7 +9,6 @@ use std::ops::{Add, AddAssign, Mul, RangeInclusive, Sub};
119use std:: str:: FromStr ;
1210
1311use bitflags:: bitflags;
14- use rustc_data_structures:: stable_hasher:: Hash64 ;
1512#[ cfg( feature = "nightly" ) ]
1613use rustc_data_structures:: stable_hasher:: StableOrd ;
1714use rustc_index:: { Idx , IndexSlice , IndexVec } ;
@@ -76,14 +73,15 @@ pub struct ReprOptions {
7673 pub align : Option < Align > ,
7774 pub pack : Option < Align > ,
7875 pub flags : ReprFlags ,
76+ #[ cfg( feature = "randomize" ) ]
7977 /// The seed to be used for randomizing a type's layout
8078 ///
8179 /// Note: This could technically be a `Hash128` which would
8280 /// be the "most accurate" hash as it'd encompass the item and crate
8381 /// hash without loss, but it does pay the price of being larger.
8482 /// Everything's a tradeoff, a 64-bit seed should be sufficient for our
8583 /// purposes (primarily `-Z randomize-layout`)
86- pub field_shuffle_seed : Hash64 ,
84+ pub field_shuffle_seed : rustc_data_structures :: stable_hasher :: Hash64 ,
8785}
8886
8987impl ReprOptions {
0 commit comments