]> git.proxmox.com Git - rustc.git/blob - tests/ui/return/issue-86188-return-not-in-fn-body.stderr
New upstream version 1.68.2+dfsg1
[rustc.git] / tests / ui / return / issue-86188-return-not-in-fn-body.stderr
1 error[E0572]: return statement outside of function body
2 --> $DIR/issue-86188-return-not-in-fn-body.rs:9:10
3 |
4 LL | [(); return || {
5 | __________^
6 LL | |
7 LL | | let tx;
8 LL | | }]
9 | |_____^
10
11 error[E0572]: return statement outside of function body
12 --> $DIR/issue-86188-return-not-in-fn-body.rs:20:14
13 |
14 LL | / fn bar() {
15 LL | |
16 LL | | [(); return];
17 | | ^^^^^^ the return is part of this body...
18 LL | |
19 LL | |
20 LL | | }
21 | |_____- ...not the enclosing function body
22
23 error[E0572]: return statement outside of function body
24 --> $DIR/issue-86188-return-not-in-fn-body.rs:28:14
25 |
26 LL | / fn foo() {
27 LL | |
28 LL | | [(); return];
29 | | ^^^^^^ the return is part of this body...
30 LL | |
31 LL | |
32 LL | | }
33 | |_____- ...not the enclosing function body
34
35 error[E0572]: return statement outside of function body
36 --> $DIR/issue-86188-return-not-in-fn-body.rs:36:10
37 |
38 LL | / fn main() {
39 LL | |
40 LL | | [(); return || {
41 | | __________^
42 LL | ||
43 LL | ||
44 LL | || let tx;
45 LL | || }];
46 | ||_____^ the return is part of this body...
47 LL | | }
48 | |__- ...not the enclosing function body
49
50 error: aborting due to 4 previous errors
51
52 For more information about this error, try `rustc --explain E0572`.