mirror of
https://github.com/rust-lang/rust.git
synced 2024-10-30 14:01:51 +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
|
|
}
|
|
}
|