fork/rust
git clone https://git.julia.blue/fork/rust
49cae55760d
1.44.0
1error: function body cannot be `= expression;` 2 --> $DIR/fn-body-eq-expr-semi.rs:4:14 3 | 4LL | fn foo() = 42; 5 | ^^^^^ 6 | 7help: surround the expression with `{` and `}` instead of `=` and `;` 8 | 9LL | fn foo() { 42 } 10 | ^ ^ 11 12error: function body cannot be `= expression;` 13 --> $DIR/fn-body-eq-expr-semi.rs:5:20 14 | 15LL | fn bar() -> u8 = 42; 16 | ^^^^^ 17 | 18help: surround the expression with `{` and `}` instead of `=` and `;` 19 | 20LL | fn bar() -> u8 { 42 } 21 | ^ ^ 22 23error: function body cannot be `= expression;` 24 --> $DIR/fn-body-eq-expr-semi.rs:9:14 25 | 26LL | fn foo() = 42; 27 | ^^^^^ 28 | 29help: surround the expression with `{` and `}` instead of `=` and `;` 30 | 31LL | fn foo() { 42 } 32 | ^ ^ 33 34error: function body cannot be `= expression;` 35 --> $DIR/fn-body-eq-expr-semi.rs:11:20 36 | 37LL | fn bar() -> u8 = 42; 38 | ^^^^^ 39 | 40help: surround the expression with `{` and `}` instead of `=` and `;` 41 | 42LL | fn bar() -> u8 { 42 } 43 | ^ ^ 44 45error: function body cannot be `= expression;` 46 --> $DIR/fn-body-eq-expr-semi.rs:16:14 47 | 48LL | fn foo() = 42; 49 | ^^^^^ 50 | 51help: surround the expression with `{` and `}` instead of `=` and `;` 52 | 53LL | fn foo() { 42 } 54 | ^ ^ 55 56error: function body cannot be `= expression;` 57 --> $DIR/fn-body-eq-expr-semi.rs:17:20 58 | 59LL | fn bar() -> u8 = 42; 60 | ^^^^^ 61 | 62help: surround the expression with `{` and `}` instead of `=` and `;` 63 | 64LL | fn bar() -> u8 { 42 } 65 | ^ ^ 66 67error: function body cannot be `= expression;` 68 --> $DIR/fn-body-eq-expr-semi.rs:21:14 69 | 70LL | fn foo() = 42; 71 | ^^^^^ 72 | 73help: surround the expression with `{` and `}` instead of `=` and `;` 74 | 75LL | fn foo() { 42 } 76 | ^ ^ 77 78error: function body cannot be `= expression;` 79 --> $DIR/fn-body-eq-expr-semi.rs:22:20 80 | 81LL | fn bar() -> u8 = 42; 82 | ^^^^^ 83 | 84help: surround the expression with `{` and `}` instead of `=` and `;` 85 | 86LL | fn bar() -> u8 { 42 } 87 | ^ ^ 88 89error: incorrect function inside `extern` block 90 --> $DIR/fn-body-eq-expr-semi.rs:9:8 91 | 92LL | extern { 93 | ------ `extern` blocks define existing foreign functions and functions inside of them cannot have a body 94LL | fn foo() = 42; 95 | ^^^ ----- help: remove the invalid body: `;` 96 | | 97 | cannot have a body 98 | 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 101 102error: incorrect function inside `extern` block 103 --> $DIR/fn-body-eq-expr-semi.rs:11:8 104 | 105LL | extern { 106 | ------ `extern` blocks define existing foreign functions and functions inside of them cannot have a body 107... 108LL | fn bar() -> u8 = 42; 109 | ^^^ ----- help: remove the invalid body: `;` 110 | | 111 | cannot have a body 112 | 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 115 116error: aborting due to 10 previous errors 117