1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159
|
error: functions cannot be both `const` and `async`
--> $DIR/fn-header-semantic-fail.rs:10:5
|
LL | const async unsafe extern "C" fn ff5() {}
| ^^^^^-^^^^^------------------------------
| | |
| | `async` because of this
| `const` because of this
error[E0379]: functions in traits cannot be declared const
--> $DIR/fn-header-semantic-fail.rs:16:9
|
LL | const fn ft3();
| ^^^^^-
| |
| functions in traits cannot be const
| help: remove the `const`
error[E0379]: functions in traits cannot be declared const
--> $DIR/fn-header-semantic-fail.rs:18:9
|
LL | const async unsafe extern "C" fn ft5();
| ^^^^^-
| |
| functions in traits cannot be const
| help: remove the `const`
error: functions cannot be both `const` and `async`
--> $DIR/fn-header-semantic-fail.rs:18:9
|
LL | const async unsafe extern "C" fn ft5();
| ^^^^^-^^^^^----------------------------
| | |
| | `async` because of this
| `const` because of this
error[E0379]: functions in trait impls cannot be declared const
--> $DIR/fn-header-semantic-fail.rs:27:9
|
LL | const fn ft3() {}
| ^^^^^-
| |
| functions in trait impls cannot be const
| help: remove the `const`
error[E0379]: functions in trait impls cannot be declared const
--> $DIR/fn-header-semantic-fail.rs:29:9
|
LL | const async unsafe extern "C" fn ft5() {}
| ^^^^^-
| |
| functions in trait impls cannot be const
| help: remove the `const`
error: functions cannot be both `const` and `async`
--> $DIR/fn-header-semantic-fail.rs:29:9
|
LL | const async unsafe extern "C" fn ft5() {}
| ^^^^^-^^^^^------------------------------
| | |
| | `async` because of this
| `const` because of this
error: functions cannot be both `const` and `async`
--> $DIR/fn-header-semantic-fail.rs:39:9
|
LL | const async unsafe extern "C" fn fi5() {}
| ^^^^^-^^^^^------------------------------
| | |
| | `async` because of this
| `const` because of this
error: functions in `extern` blocks cannot have `async` qualifier
--> $DIR/fn-header-semantic-fail.rs:44:9
|
LL | extern "C" {
| ---------- in this `extern` block
LL | async fn fe1();
| ^^^^^ help: remove the `async` qualifier
error: items in `extern` blocks without an `unsafe` qualifier cannot have safety qualifiers
--> $DIR/fn-header-semantic-fail.rs:45:9
|
LL | unsafe fn fe2();
| ^^^^^^^^^^^^^^^^
|
help: add `unsafe` to this `extern` block
|
LL | unsafe extern "C" {
| ++++++
error: functions in `extern` blocks cannot have `const` qualifier
--> $DIR/fn-header-semantic-fail.rs:46:9
|
LL | extern "C" {
| ---------- in this `extern` block
...
LL | const fn fe3();
| ^^^^^ help: remove the `const` qualifier
error: functions in `extern` blocks cannot have `extern` qualifier
--> $DIR/fn-header-semantic-fail.rs:47:9
|
LL | extern "C" {
| ---------- in this `extern` block
...
LL | extern "C" fn fe4();
| ^^^^^^^^^^ help: remove the `extern` qualifier
error: functions in `extern` blocks cannot have `async` qualifier
--> $DIR/fn-header-semantic-fail.rs:48:15
|
LL | extern "C" {
| ---------- in this `extern` block
...
LL | const async unsafe extern "C" fn fe5();
| ^^^^^ help: remove the `async` qualifier
error: functions in `extern` blocks cannot have `const` qualifier
--> $DIR/fn-header-semantic-fail.rs:48:9
|
LL | extern "C" {
| ---------- in this `extern` block
...
LL | const async unsafe extern "C" fn fe5();
| ^^^^^ help: remove the `const` qualifier
error: functions in `extern` blocks cannot have `extern` qualifier
--> $DIR/fn-header-semantic-fail.rs:48:28
|
LL | extern "C" {
| ---------- in this `extern` block
...
LL | const async unsafe extern "C" fn fe5();
| ^^^^^^^^^^ help: remove the `extern` qualifier
error: items in `extern` blocks without an `unsafe` qualifier cannot have safety qualifiers
--> $DIR/fn-header-semantic-fail.rs:48:9
|
LL | const async unsafe extern "C" fn fe5();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
help: add `unsafe` to this `extern` block
|
LL | unsafe extern "C" {
| ++++++
error: functions cannot be both `const` and `async`
--> $DIR/fn-header-semantic-fail.rs:48:9
|
LL | const async unsafe extern "C" fn fe5();
| ^^^^^-^^^^^----------------------------
| | |
| | `async` because of this
| `const` because of this
error: aborting due to 17 previous errors
For more information about this error, try `rustc --explain E0379`.
|