1 error: all if blocks contain the same code at the start and the end. Here at the start
2 --> $DIR/shared_at_top_and_bottom.rs:16:5
6 LL | | let _overlap_start = t * 2;
7 LL | | let _overlap_end = 2 * t;
8 | |_________________________________^
10 note: the lint level is defined here
11 --> $DIR/shared_at_top_and_bottom.rs:2:36
13 LL | #![deny(clippy::if_same_then_else, clippy::branches_sharing_code)]
14 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
15 note: and here at the end
16 --> $DIR/shared_at_top_and_bottom.rs:28:5
21 help: consider moving the start statements out like this
24 LL + let _overlap_start = t * 2;
25 LL + let _overlap_end = 2 * t;
28 help: and consider moving the end statements out like this
34 error: all if blocks contain the same code at the start and the end. Here at the start
35 --> $DIR/shared_at_top_and_bottom.rs:32:5
39 LL | | let _overlap_start = r;
40 LL | | let _overlap_middle = r * r;
41 | |____________________________________^
43 note: and here at the end
44 --> $DIR/shared_at_top_and_bottom.rs:43:5
46 LL | / let _overlap_end = r * r * r;
50 = warning: Some moved values might need to be renamed to avoid wrong references
51 help: consider moving the start statements out like this
54 LL + let _overlap_start = r;
55 LL + let _overlap_middle = r * r;
58 help: and consider moving the end statements out like this
61 LL + let _overlap_end = r * r * r;
65 error: all if blocks contain the same code at the start and the end. Here at the start
66 --> $DIR/shared_at_top_and_bottom.rs:61:5
68 LL | / if (x > 7 && y < 13) || (x + y) % 2 == 1 {
69 LL | | let a = 0xcafe;
70 LL | | let b = 0xffff00ff;
71 LL | | let e_id = gen_id(a, b);
72 | |________________________________^
74 note: and here at the end
75 --> $DIR/shared_at_top_and_bottom.rs:81:5
77 LL | / let pack = DataPack {
79 LL | | name: "Player 1".to_string(),
80 LL | | some_data: vec![0x12, 0x34, 0x56, 0x78, 0x90],
82 LL | | process_data(pack);
85 = warning: Some moved values might need to be renamed to avoid wrong references
86 help: consider moving the start statements out like this
89 LL + let b = 0xffff00ff;
90 LL + let e_id = gen_id(a, b);
91 LL + if (x > 7 && y < 13) || (x + y) % 2 == 1 {
93 help: and consider moving the end statements out like this
96 LL + let pack = DataPack {
98 LL + name: "Player 1".to_string(),
99 LL + some_data: vec![0x12, 0x34, 0x56, 0x78, 0x90],
103 error: all if blocks contain the same code at the start and the end. Here at the start
104 --> $DIR/shared_at_top_and_bottom.rs:94:5
106 LL | / let _ = if x == 7 {
108 | |___________________^
110 note: and here at the end
111 --> $DIR/shared_at_top_and_bottom.rs:103:5
116 = note: The end suggestion probably needs some adjustments to use the expression result correctly
117 help: consider moving the start statements out like this
120 LL + let _ = if x == 7 {
122 help: and consider moving the end statements out like this
128 error: all if blocks contain the same code at the start and the end. Here at the start
129 --> $DIR/shared_at_top_and_bottom.rs:106:5
133 | |___________________^
135 note: and here at the end
136 --> $DIR/shared_at_top_and_bottom.rs:115:5
141 = note: The end suggestion probably needs some adjustments to use the expression result correctly
142 help: consider moving the start statements out like this
147 help: and consider moving the end statements out like this
153 error: aborting due to 5 previous errors