mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 14:55:26 +00:00
32 lines
410 B
Rust
32 lines
410 B
Rust
fn main() {
|
|
let a: i8 = loop {
|
|
1 //~ ERROR mismatched types
|
|
};
|
|
|
|
let b: i8 = loop {
|
|
break 1;
|
|
};
|
|
}
|
|
|
|
fn foo() -> i8 {
|
|
let a: i8 = loop {
|
|
1 //~ ERROR mismatched types
|
|
};
|
|
|
|
let b: i8 = loop {
|
|
break 1;
|
|
};
|
|
|
|
loop {
|
|
1 //~ ERROR mismatched types
|
|
}
|
|
|
|
loop {
|
|
return 1;
|
|
}
|
|
|
|
loop {
|
|
1 //~ ERROR mismatched types
|
|
}
|
|
}
|