]>
Commit | Line | Data |
---|---|---|
a7813a04 | 1 | fn main() { |
136023e0 XL |
2 | //~^ NOTE: not the enclosing function body |
3 | //~| NOTE: not the enclosing function body | |
4 | //~| NOTE: not the enclosing function body | |
60c5eb7d | 5 | [(); return match 0 { n => n }]; |
136023e0 XL |
6 | //~^ ERROR: return statement outside of function body [E0572] |
7 | //~| NOTE: the return is part of this body... | |
0531ce1d | 8 | |
60c5eb7d | 9 | [(); return match 0 { 0 => 0 }]; |
136023e0 XL |
10 | //~^ ERROR: return statement outside of function body [E0572] |
11 | //~| NOTE: the return is part of this body... | |
0531ce1d | 12 | |
60c5eb7d | 13 | [(); return match () { 'a' => 0, _ => 0 }]; |
136023e0 XL |
14 | //~^ ERROR: return statement outside of function body [E0572] |
15 | //~| NOTE: the return is part of this body... | |
16 | //~| ERROR: mismatched types [E0308] | |
17 | //~| NOTE: expected `()`, found `char` | |
18 | //~| NOTE: this expression has type `()` | |
54a0048b | 19 | } |