mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-27 15:11:30 +00:00
Fix test
`if true` is recognized by MIR optimization.
This commit is contained in:
parent
790e611c9c
commit
a4fe567602
1 changed files with 2 additions and 2 deletions
|
@ -38,8 +38,8 @@ fn main() {
|
||||||
|
|
||||||
#[derive(Clone)]
|
#[derive(Clone)]
|
||||||
struct Alpha;
|
struct Alpha;
|
||||||
fn double(a: Alpha) -> (Alpha, Alpha) {
|
fn with_branch(a: Alpha, b: bool) -> (Alpha, Alpha) {
|
||||||
if true {
|
if b {
|
||||||
(a.clone(), a.clone())
|
(a.clone(), a.clone())
|
||||||
} else {
|
} else {
|
||||||
(Alpha, a)
|
(Alpha, a)
|
||||||
|
|
Loading…
Reference in a new issue