1 error: function body cannot be `= expression;`
2 --> $DIR/fn-body-eq-expr-semi.rs:4:14
7 help: surround the expression with `{` and `}` instead of `=` and `;`
12 error: function body cannot be `= expression;`
13 --> $DIR/fn-body-eq-expr-semi.rs:5:20
15 LL | fn bar() -> u8 = 42;
18 help: surround the expression with `{` and `}` instead of `=` and `;`
20 LL | fn bar() -> u8 { 42 }
23 error: function body cannot be `= expression;`
24 --> $DIR/fn-body-eq-expr-semi.rs:9:14
29 help: surround the expression with `{` and `}` instead of `=` and `;`
34 error: function body cannot be `= expression;`
35 --> $DIR/fn-body-eq-expr-semi.rs:11:20
37 LL | fn bar() -> u8 = 42;
40 help: surround the expression with `{` and `}` instead of `=` and `;`
42 LL | fn bar() -> u8 { 42 }
45 error: function body cannot be `= expression;`
46 --> $DIR/fn-body-eq-expr-semi.rs:16:14
51 help: surround the expression with `{` and `}` instead of `=` and `;`
56 error: function body cannot be `= expression;`
57 --> $DIR/fn-body-eq-expr-semi.rs:17:20
59 LL | fn bar() -> u8 = 42;
62 help: surround the expression with `{` and `}` instead of `=` and `;`
64 LL | fn bar() -> u8 { 42 }
67 error: function body cannot be `= expression;`
68 --> $DIR/fn-body-eq-expr-semi.rs:21:14
73 help: surround the expression with `{` and `}` instead of `=` and `;`
78 error: function body cannot be `= expression;`
79 --> $DIR/fn-body-eq-expr-semi.rs:22:20
81 LL | fn bar() -> u8 = 42;
84 help: surround the expression with `{` and `}` instead of `=` and `;`
86 LL | fn bar() -> u8 { 42 }
89 error: incorrect function inside `extern` block
90 --> $DIR/fn-body-eq-expr-semi.rs:9:8
93 | ---------- `extern` blocks define existing foreign functions and functions inside of them cannot have a body
95 | ^^^ ----- help: remove the invalid body: `;`
99 = help: you might have meant to write a function accessible through FFI, which can be done by writing `extern fn` outside of the `extern` block
100 = note: for more information, visit https://doc.rust-lang.org/std/keyword.extern.html
102 error: incorrect function inside `extern` block
103 --> $DIR/fn-body-eq-expr-semi.rs:11:8
106 | ---------- `extern` blocks define existing foreign functions and functions inside of them cannot have a body
108 LL | fn bar() -> u8 = 42;
109 | ^^^ ----- help: remove the invalid body: `;`
113 = help: you might have meant to write a function accessible through FFI, which can be done by writing `extern fn` outside of the `extern` block
114 = note: for more information, visit https://doc.rust-lang.org/std/keyword.extern.html
116 error: aborting due to 10 previous errors