Skip to content

Commit d1a83c6

Browse files
committed
Remove checked arithmetic from if expression hash tests
1 parent 6424688 commit d1a83c6

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/test/incremental/hashes/if_expressions.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ pub fn add_else_branch(x: bool) -> u32 {
104104
let mut ret = 1;
105105

106106
if x {
107-
ret += 1;
107+
ret = 2;
108108
}
109109

110110
ret
@@ -119,7 +119,7 @@ pub fn add_else_branch(x: bool) -> u32 {
119119
let mut ret = 1;
120120

121121
if x {
122-
ret += 1;
122+
ret = 2;
123123
} else {
124124
}
125125

@@ -209,7 +209,7 @@ pub fn add_else_branch_if_let(x: Option<u32>) -> u32 {
209209
let mut ret = 1;
210210

211211
if let Some(x) = x {
212-
ret += x;
212+
ret = x;
213213
}
214214

215215
ret
@@ -224,7 +224,7 @@ pub fn add_else_branch_if_let(x: Option<u32>) -> u32 {
224224
let mut ret = 1;
225225

226226
if let Some(x) = x {
227-
ret += x;
227+
ret = x;
228228
} else {
229229
}
230230

0 commit comments

Comments
 (0)