1▶A return statement was found outside of a function body.
2
3Erroneous code example:
· · ·
4
5```compile_fail,E0572
6▶const FOO: u32 = return 0; // error: return statement outside of function body
7
8fn main() {}
· · ·
8▶fn main() {}
9```
10
· · ·
11To fix this issue, just remove the return keyword or move the expression into a
12▶function. Example:
13
14```
· · ·
19}
20
21▶fn main() {
22 some_fn();
23}