2021-04-24 18:08:22 +02:00
|
|
|
fn main() {
|
2021-04-24 19:00:24 +02:00
|
|
|
let a: i8 = loop {
|
|
|
|
1 //~ ERROR mismatched types
|
2021-04-24 18:08:22 +02:00
|
|
|
};
|
2021-04-24 19:00:24 +02:00
|
|
|
|
|
|
|
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;
|
|
|
|
}
|
2021-04-24 22:20:08 +02:00
|
|
|
|
|
|
|
loop {
|
|
|
|
1 //~ ERROR mismatched types
|
|
|
|
}
|
2021-04-24 18:08:22 +02:00
|
|
|
}
|