@@ -2008,12 +2008,12 @@ impl<'tcx> Const<'tcx> {
2008
2008
2009
2009
#[ inline]
2010
2010
pub fn from_bool ( tcx : TyCtxt < ' _ , ' _ , ' tcx > , v : bool ) -> & ' tcx Self {
2011
- Self :: from_bits ( tcx, v as u128 , ParamEnv :: empty ( ) . and ( tcx. types . bool ) )
2011
+ Self :: from_bits ( tcx, v as u128 , ParamEnv :: reveal_all ( ) . and ( tcx. types . bool ) )
2012
2012
}
2013
2013
2014
2014
#[ inline]
2015
2015
pub fn from_usize ( tcx : TyCtxt < ' _ , ' _ , ' tcx > , n : u64 ) -> & ' tcx Self {
2016
- Self :: from_bits ( tcx, n as u128 , ParamEnv :: empty ( ) . and ( tcx. types . usize ) )
2016
+ Self :: from_bits ( tcx, n as u128 , ParamEnv :: reveal_all ( ) . and ( tcx. types . usize ) )
2017
2017
}
2018
2018
2019
2019
#[ inline]
@@ -2044,7 +2044,7 @@ impl<'tcx> Const<'tcx> {
2044
2044
2045
2045
#[ inline]
2046
2046
pub fn assert_bool ( & self , tcx : TyCtxt < ' _ , ' _ , ' _ > ) -> Option < bool > {
2047
- self . assert_bits ( tcx, ParamEnv :: empty ( ) . and ( tcx. types . bool ) ) . and_then ( |v| match v {
2047
+ self . assert_bits ( tcx, ParamEnv :: reveal_all ( ) . and ( tcx. types . bool ) ) . and_then ( |v| match v {
2048
2048
0 => Some ( false ) ,
2049
2049
1 => Some ( true ) ,
2050
2050
_ => None ,
@@ -2053,7 +2053,7 @@ impl<'tcx> Const<'tcx> {
2053
2053
2054
2054
#[ inline]
2055
2055
pub fn assert_usize ( & self , tcx : TyCtxt < ' _ , ' _ , ' _ > ) -> Option < u64 > {
2056
- self . assert_bits ( tcx, ParamEnv :: empty ( ) . and ( tcx. types . usize ) ) . map ( |v| v as u64 )
2056
+ self . assert_bits ( tcx, ParamEnv :: reveal_all ( ) . and ( tcx. types . usize ) ) . map ( |v| v as u64 )
2057
2057
}
2058
2058
2059
2059
#[ inline]
0 commit comments