about summary refs log tree commit diff
path: root/tests/ui/typeck/issue-100285.rs
blob: bea4b2bc2bbe7dbded361fe1c1ec411f2ecf72fd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
fn foo(n: i32) -> i32 {
    for i in 0..0 { //~ ERROR mismatched types [E0308]
       if n < 0 {
        return i;
        } else if n < 10 {
          return 1;
        } else if n < 20 {
          return 2;
        } else if n < 30 {
          return 3;
        } else if n < 40 {
          return 4;
        } else {
          return 5;
        }

    } //~ HELP consider returning a value here
}

fn main() {}