]> git.lizzy.rs Git - rust.git/blob - src/test/ui/can-begin-expr-check.rs
Rollup merge of #57107 - mjbshaw:thread_local_test, r=nikomatsakis
[rust.git] / src / test / ui / can-begin-expr-check.rs
1 pub fn main() {
2
3     return;
4     return ();
5     return as ();
6     return return as ();
7     return return return;
8
9     return if true {
10         ()
11     } else {
12         ()
13     };
14
15     loop {
16         return break as ();
17     }
18
19     return enum; //~ ERROR expected one of `.`, `;`, `?`, `}`, or an operator, found `enum`
20 }