@@ -4,8 +4,8 @@ use crate::consts::{constant, Constant};
4
4
use crate :: reexport:: * ;
5
5
use crate :: utils:: paths;
6
6
use crate :: utils:: {
7
- clip, comparisons, differing_macro_contexts, get_def_path , higher, in_constant, in_macro, int_bits,
8
- last_path_segment , match_def_path, match_path, multispan_sugg, opt_def_id, same_tys, sext, snippet, snippet_opt,
7
+ clip, comparisons, differing_macro_contexts, higher, in_constant, in_macro, int_bits, last_path_segment ,
8
+ match_def_path, match_path, multispan_sugg, opt_def_id, same_tys, sext, snippet, snippet_opt,
9
9
snippet_with_applicability, span_help_and_lint, span_lint, span_lint_and_sugg, span_lint_and_then, unsext,
10
10
AbsolutePathBuffer ,
11
11
} ;
@@ -1018,23 +1018,6 @@ fn check_loss_of_sign(cx: &LateContext<'_, '_>, expr: &Expr, op: &Expr, cast_fro
1018
1018
}
1019
1019
}
1020
1020
1021
- // don't lint for max_value const fns
1022
- if_chain ! {
1023
- if let ExprKind :: Call ( callee, args) = & op. node;
1024
- if args. is_empty( ) ;
1025
- if let ExprKind :: Path ( qpath) = & callee. node;
1026
- let def = cx. tables. qpath_def( qpath, callee. hir_id) ;
1027
- if let Some ( def_id) = def. opt_def_id( ) ;
1028
- let def_path = get_def_path( cx. tcx, def_id) ;
1029
- if let & [ "core" , "num" , impl_ty, "max_value" ] = & def_path[ ..] ;
1030
- then {
1031
- if let "<impl i8>" | "<impl i16>" | "<impl i32>" |
1032
- "<impl i64>" | "<impl i128>" = impl_ty {
1033
- return ;
1034
- }
1035
- }
1036
- }
1037
-
1038
1021
span_lint (
1039
1022
cx,
1040
1023
CAST_SIGN_LOSS ,
0 commit comments