Skip to content

Commit a4fe567

Browse files
committed
Fix test
`if true` is recognized by MIR optimization.
1 parent 790e611 commit a4fe567

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/ui/redundant_clone.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ fn main() {
3838

3939
#[derive(Clone)]
4040
struct Alpha;
41-
fn double(a: Alpha) -> (Alpha, Alpha) {
42-
if true {
41+
fn with_branch(a: Alpha, b: bool) -> (Alpha, Alpha) {
42+
if b {
4343
(a.clone(), a.clone())
4444
} else {
4545
(Alpha, a)

0 commit comments

Comments
 (0)