@@ -131,15 +131,15 @@ impl<'a, 'tcx> PatCtxt<'a, 'tcx> {
131
131
if let Some ( hir:: Expr { kind : hir:: ExprKind :: Lit ( lit) , .. } ) = lo_expr
132
132
&& let rustc_ast:: ast:: LitKind :: Int ( val, _) = lit. node
133
133
{
134
- if lo. eval_bits ( self . tcx , self . param_env , ty ) != val {
134
+ if lo. eval_bits ( self . tcx , self . param_env ) != val {
135
135
lower_overflow = true ;
136
136
self . tcx . sess . emit_err ( LiteralOutOfRange { span : lit. span , ty, max : max ( ) } ) ;
137
137
}
138
138
}
139
139
if let Some ( hir:: Expr { kind : hir:: ExprKind :: Lit ( lit) , .. } ) = hi_expr
140
140
&& let rustc_ast:: ast:: LitKind :: Int ( val, _) = lit. node
141
141
{
142
- if hi. eval_bits ( self . tcx , self . param_env , ty ) != val {
142
+ if hi. eval_bits ( self . tcx , self . param_env ) != val {
143
143
higher_overflow = true ;
144
144
self . tcx . sess . emit_err ( LiteralOutOfRange { span : lit. span , ty, max : max ( ) } ) ;
145
145
}
@@ -162,15 +162,15 @@ impl<'a, 'tcx> PatCtxt<'a, 'tcx> {
162
162
if let Some ( hir:: Expr { kind : hir:: ExprKind :: Lit ( lit) , .. } ) = lo_expr
163
163
&& let rustc_ast:: ast:: LitKind :: Int ( val, _) = lit. node
164
164
{
165
- if lo. eval_bits ( self . tcx , self . param_env , ty ) != val {
165
+ if lo. eval_bits ( self . tcx , self . param_env ) != val {
166
166
lower_overflow = true ;
167
167
self . tcx . sess . emit_err ( LiteralOutOfRange { span : lit. span , ty, max : max ( ) } ) ;
168
168
}
169
169
}
170
170
if let Some ( hir:: Expr { kind : hir:: ExprKind :: Lit ( lit) , .. } ) = hi_expr
171
171
&& let rustc_ast:: ast:: LitKind :: Int ( val, _) = lit. node
172
172
{
173
- if hi. eval_bits ( self . tcx , self . param_env , ty ) != val {
173
+ if hi. eval_bits ( self . tcx , self . param_env ) != val {
174
174
higher_overflow = true ;
175
175
self . tcx . sess . emit_err ( LiteralOutOfRange { span : lit. span , ty, max : max ( ) } ) ;
176
176
}
@@ -865,8 +865,8 @@ pub(crate) fn compare_const_vals<'tcx>(
865
865
} ,
866
866
}
867
867
868
- let a = a. eval_bits ( tcx, param_env, ty ) ;
869
- let b = b. eval_bits ( tcx, param_env, ty ) ;
868
+ let a = a. eval_bits ( tcx, param_env) ;
869
+ let b = b. eval_bits ( tcx, param_env) ;
870
870
871
871
use rustc_apfloat:: Float ;
872
872
match * ty. kind ( ) {
0 commit comments