1
- // We want to be able to build this crate with a stable compiler, so no
2
- // `#![feature]` attributes should be added.
3
1
#![ cfg_attr( feature = "nightly" , feature( step_trait, rustc_attrs, min_specialization) ) ]
4
2
#![ cfg_attr( feature = "nightly" , allow( internal_features) ) ]
5
3
@@ -11,7 +9,6 @@ use std::ops::{Add, AddAssign, Mul, RangeInclusive, Sub};
11
9
use std:: str:: FromStr ;
12
10
13
11
use bitflags:: bitflags;
14
- use rustc_data_structures:: stable_hasher:: Hash64 ;
15
12
#[ cfg( feature = "nightly" ) ]
16
13
use rustc_data_structures:: stable_hasher:: StableOrd ;
17
14
use rustc_index:: { Idx , IndexSlice , IndexVec } ;
@@ -76,14 +73,15 @@ pub struct ReprOptions {
76
73
pub align : Option < Align > ,
77
74
pub pack : Option < Align > ,
78
75
pub flags : ReprFlags ,
76
+ #[ cfg( feature = "randomize" ) ]
79
77
/// The seed to be used for randomizing a type's layout
80
78
///
81
79
/// Note: This could technically be a `Hash128` which would
82
80
/// be the "most accurate" hash as it'd encompass the item and crate
83
81
/// hash without loss, but it does pay the price of being larger.
84
82
/// Everything's a tradeoff, a 64-bit seed should be sufficient for our
85
83
/// purposes (primarily `-Z randomize-layout`)
86
- pub field_shuffle_seed : Hash64 ,
84
+ pub field_shuffle_seed : rustc_data_structures :: stable_hasher :: Hash64 ,
87
85
}
88
86
89
87
impl ReprOptions {
0 commit comments