mirror of
https://github.com/rust-lang/rust
synced 2024-11-05 20:45:15 +00:00
24 lines
419 B
Rust
24 lines
419 B
Rust
//@ run-rustfix
|
|
|
|
fn main() {
|
|
let a: usize = 123;
|
|
let b: &usize = &a;
|
|
|
|
if true {
|
|
a
|
|
} else {
|
|
*b //~ ERROR `if` and `else` have incompatible types [E0308]
|
|
};
|
|
|
|
if true {
|
|
1
|
|
} else {
|
|
1 //~ ERROR `if` and `else` have incompatible types [E0308]
|
|
};
|
|
|
|
if true {
|
|
1
|
|
} else {
|
|
1 //~ ERROR `if` and `else` have incompatible types [E0308]
|
|
};
|
|
}
|