Skip to content

Commit aba5160

Browse files
committed
Change some useless ParamEnv::empty to reveal_all
1 parent f8c3dc6 commit aba5160

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/librustc/ty/sty.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2008,12 +2008,12 @@ impl<'tcx> Const<'tcx> {
20082008

20092009
#[inline]
20102010
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))
20122012
}
20132013

20142014
#[inline]
20152015
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))
20172017
}
20182018

20192019
#[inline]
@@ -2044,7 +2044,7 @@ impl<'tcx> Const<'tcx> {
20442044

20452045
#[inline]
20462046
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 {
20482048
0 => Some(false),
20492049
1 => Some(true),
20502050
_ => None,
@@ -2053,7 +2053,7 @@ impl<'tcx> Const<'tcx> {
20532053

20542054
#[inline]
20552055
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)
20572057
}
20582058

20592059
#[inline]

0 commit comments

Comments
 (0)