@@ -28,6 +28,7 @@ use clippy_utils::def_path_def_ids;
28
28
use rustc_hir:: def_id:: DefIdSet ;
29
29
use rustc_hir:: { Body , Expr , ExprKind , UnOp } ;
30
30
use rustc_lint:: { LateContext , LateLintPass } ;
31
+ use rustc_middle:: ty:: TyCtxt ;
31
32
use rustc_session:: impl_lint_pass;
32
33
33
34
declare_clippy_lint ! {
@@ -789,7 +790,7 @@ pub struct Operators {
789
790
float_cmp_config : FloatCmpConfig ,
790
791
}
791
792
impl Operators {
792
- pub fn new ( conf : & ' static Conf ) -> Self {
793
+ pub fn new ( tcx : TyCtxt < ' _ > , conf : & ' static Conf ) -> Self {
793
794
Self {
794
795
arithmetic_context : numeric_arithmetic:: Context :: default ( ) ,
795
796
verbose_bit_mask_threshold : conf. verbose_bit_mask_threshold ,
@@ -859,7 +860,7 @@ impl<'tcx> LateLintPass<'tcx> for Operators {
859
860
float_equality_without_abs:: check ( cx, e, op. node , lhs, rhs) ;
860
861
integer_division:: check ( cx, e, op. node , lhs, rhs) ;
861
862
cmp_owned:: check ( cx, op. node , lhs, rhs) ;
862
- float_cmp:: check ( cx, self . float_cmp_config , e, op. node , lhs, rhs) ;
863
+ float_cmp:: check ( cx, & self . float_cmp_config , e, op. node , lhs, rhs) ;
863
864
modulo_one:: check ( cx, e, op. node , rhs) ;
864
865
modulo_arithmetic:: check (
865
866
cx,
0 commit comments