mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-01 03:03:40 +00:00
faf97a67d6
* Added test cases * Fixed if condition comment issue * Fixed extern C issue * Removed previous test case * Removed tmp file * honor the authors intent * Changed the file name to its original name * Removed extra whitespace
86 lines
1.0 KiB
Rust
86 lines
1.0 KiB
Rust
fn main() {
|
|
let x = if true {
|
|
1
|
|
// In if
|
|
} else {
|
|
0
|
|
// In else
|
|
};
|
|
|
|
let x = if true {
|
|
1
|
|
/* In if */
|
|
} else {
|
|
0
|
|
/* In else */
|
|
};
|
|
|
|
let z = if true {
|
|
if true {
|
|
1
|
|
|
|
// In if level 2
|
|
} else {
|
|
2
|
|
}
|
|
} else {
|
|
3
|
|
};
|
|
|
|
let a = if true {
|
|
1
|
|
// In if
|
|
} else {
|
|
0
|
|
// In else
|
|
};
|
|
|
|
let a = if true {
|
|
1
|
|
|
|
// In if
|
|
} else {
|
|
0
|
|
// In else
|
|
};
|
|
|
|
let b = if true {
|
|
1
|
|
|
|
// In if
|
|
} else {
|
|
0
|
|
// In else
|
|
};
|
|
|
|
let c = if true {
|
|
1
|
|
|
|
// In if
|
|
} else {
|
|
0
|
|
// In else
|
|
};
|
|
for i in 0..2 {
|
|
println!("Something");
|
|
// In for
|
|
}
|
|
|
|
for i in 0..2 {
|
|
println!("Something");
|
|
/* In for */
|
|
}
|
|
|
|
extern "C" {
|
|
fn first();
|
|
|
|
// In foreign mod
|
|
}
|
|
|
|
extern "C" {
|
|
fn first();
|
|
|
|
/* In foreign mod */
|
|
}
|
|
}
|