blob: 2553824bbfebb64720ac106dfd9f46e6d6a2534b (
plain)
1
2
3
4
5
6
7
8
9
|
fn foo() -> i32 {
for i in 0..0 {
//~^ ERROR: mismatched types [E0308]
return i;
}
//~| help: return a value for the case when the loop has zero elements to iterate on, or consider changing the return type to account for that possibility
}
fn main() {}
|