@@ -15,10 +15,10 @@ LL | #![deny(clippy::if_same_then_else, clippy::branches_sharing_code)]
1515 = note: The end suggestion probably needs some adjustments to use the expression result correctly
1616help: consider moving the end statements out like this
1717 |
18- LL | }
19- LL | let result = false;
20- LL | println!("Block end!");
21- LL | result;
18+ LL ~ }
19+ LL + let result = false;
20+ LL + println!("Block end!");
21+ LL ~ result;
2222 |
2323
2424error: all if blocks contain the same code at the end
@@ -30,8 +30,8 @@ LL | | }
3030 |
3131help: consider moving the end statements out like this
3232 |
33- LL | }
34- LL | println!("Same end of block");
33+ LL ~ }
34+ LL + println!("Same end of block");
3535 |
3636
3737error: all if blocks contain the same code at the end
@@ -46,11 +46,11 @@ LL | | }
4646 |
4747help: consider moving the end statements out like this
4848 |
49- LL | }
50- LL | println!(
51- LL | "I'm moveable because I know: `outer_scope_value`: '{}'",
52- LL | outer_scope_value
53- LL | );
49+ LL ~ }
50+ LL + println!(
51+ LL + "I'm moveable because I know: `outer_scope_value`: '{}'",
52+ LL + outer_scope_value
53+ LL + );
5454 |
5555
5656error: all if blocks contain the same code at the end
@@ -62,8 +62,8 @@ LL | | }
6262 |
6363help: consider moving the end statements out like this
6464 |
65- LL | }
66- LL | println!("Hello World");
65+ LL ~ }
66+ LL + println!("Hello World");
6767 |
6868
6969error: all if blocks contain the same code at the end
@@ -78,9 +78,9 @@ LL | | }
7878 = warning: Some moved values might need to be renamed to avoid wrong references
7979help: consider moving the end statements out like this
8080 |
81- LL | }
82- LL | let later_used_value = "A string value";
83- LL | println!("{}", later_used_value);
81+ LL ~ }
82+ LL + let later_used_value = "A string value";
83+ LL + println!("{}", later_used_value);
8484 |
8585
8686error: all if blocks contain the same code at the end
@@ -94,9 +94,9 @@ LL | | }
9494 = warning: Some moved values might need to be renamed to avoid wrong references
9595help: consider moving the end statements out like this
9696 |
97- LL | }
98- LL | let simple_examples = "I now identify as a &str :)";
99- LL | println!("This is the new simple_example: {}", simple_examples);
97+ LL ~ }
98+ LL + let simple_examples = "I now identify as a &str :)";
99+ LL + println!("This is the new simple_example: {}", simple_examples);
100100 |
101101
102102error: all if blocks contain the same code at the end
@@ -109,8 +109,8 @@ LL | | };
109109 = note: The end suggestion probably needs some adjustments to use the expression result correctly
110110help: consider moving the end statements out like this
111111 |
112- LL | }
113- LL | x << 2;
112+ LL ~ }
113+ LL ~ x << 2;
114114 |
115115
116116error: all if blocks contain the same code at the end
@@ -123,8 +123,8 @@ LL | | }
123123 = note: The end suggestion probably needs some adjustments to use the expression result correctly
124124help: consider moving the end statements out like this
125125 |
126- LL | }
127- LL | x * 4
126+ LL ~ }
127+ LL + x * 4
128128 |
129129
130130error: all if blocks contain the same code at the end
@@ -135,8 +135,8 @@ LL | if x == 17 { b = 1; a = 0x99; } else { a = 0x99; }
135135 |
136136help: consider moving the end statements out like this
137137 |
138- LL | if x == 17 { b = 1; a = 0x99; } else { }
139- LL | a = 0x99;
138+ LL ~ if x == 17 { b = 1; a = 0x99; } else { }
139+ LL + a = 0x99;
140140 |
141141
142142error: aborting due to 9 previous errors
0 commit comments