File tree Expand file tree Collapse file tree 2 files changed +17
-0
lines changed Expand file tree Collapse file tree 2 files changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -74,3 +74,19 @@ fn inferred_type(x: f64) -> i32 {
74
74
fn block_expression ( x : u32 ) -> f64 {
75
75
x as f64 / 2.0
76
76
}
77
+
78
+ #[ allow(
79
+ arithmetic_overflow,
80
+ dead_code,
81
+ clippy:: cast_lossless,
82
+ clippy:: neg_multiply
83
+ ) ]
84
+ #[ cast_checks:: enable]
85
+ #[ deny( unused_parens, clippy:: double_parens) ]
86
+ fn unused_parens ( use_parens : bool ) -> i64 {
87
+ if use_parens {
88
+ ( -1 * i32:: MIN ) as i64
89
+ } else {
90
+ -1 * i32:: MIN as i64
91
+ }
92
+ }
Original file line number Diff line number Diff line change @@ -90,6 +90,7 @@ impl VisitMut for Visitor {
90
90
#[ allow( unused_imports) ]
91
91
use cast_checks:: MaybeTryIntoFallback ;
92
92
93
+ #[ allow( unused_parens, clippy:: double_parens) ]
93
94
if let Some ( result) = cast_checks:: MaybeTryInto :: <_, #ty >:: new( #operand ) . maybe_try_into( ) {
94
95
result. expect( #msg )
95
96
} else {
You can’t perform that action at this time.
0 commit comments