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 } ;
@@ -75,14 +72,15 @@ pub struct ReprOptions {
75
72
pub align : Option < Align > ,
76
73
pub pack : Option < Align > ,
77
74
pub flags : ReprFlags ,
75
+ #[ cfg( feature = "randomize" ) ]
78
76
/// The seed to be used for randomizing a type's layout
79
77
///
80
78
/// Note: This could technically be a `Hash128` which would
81
79
/// be the "most accurate" hash as it'd encompass the item and crate
82
80
/// hash without loss, but it does pay the price of being larger.
83
81
/// Everything's a tradeoff, a 64-bit seed should be sufficient for our
84
82
/// purposes (primarily `-Z randomize-layout`)
85
- pub field_shuffle_seed : Hash64 ,
83
+ pub field_shuffle_seed : rustc_data_structures :: stable_hasher :: Hash64 ,
86
84
}
87
85
88
86
impl ReprOptions {
0 commit comments