@@ -28,6 +28,7 @@ use clippy_utils::def_path_def_ids;
2828use rustc_hir:: def_id:: DefIdSet ;
2929use rustc_hir:: { Body , Expr , ExprKind , UnOp } ;
3030use rustc_lint:: { LateContext , LateLintPass } ;
31+ use rustc_middle:: ty:: TyCtxt ;
3132use rustc_session:: impl_lint_pass;
3233
3334declare_clippy_lint ! {
@@ -789,7 +790,7 @@ pub struct Operators {
789790 float_cmp_config : FloatCmpConfig ,
790791}
791792impl Operators {
792- pub fn new ( conf : & ' static Conf ) -> Self {
793+ pub fn new ( tcx : TyCtxt < ' _ > , conf : & ' static Conf ) -> Self {
793794 Self {
794795 arithmetic_context : numeric_arithmetic:: Context :: default ( ) ,
795796 verbose_bit_mask_threshold : conf. verbose_bit_mask_threshold ,
@@ -859,7 +860,7 @@ impl<'tcx> LateLintPass<'tcx> for Operators {
859860 float_equality_without_abs:: check ( cx, e, op. node , lhs, rhs) ;
860861 integer_division:: check ( cx, e, op. node , lhs, rhs) ;
861862 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) ;
863864 modulo_one:: check ( cx, e, op. node , rhs) ;
864865 modulo_arithmetic:: check (
865866 cx,
0 commit comments