fork/rust
git clone https://git.julia.blue/fork/rust
8d69840ab92
1.43.1
1error: functions cannot be both `const` and `async` 2 --> $DIR/fn-header-semantic-fail.rs:13:5 3 | 4LL | const async unsafe extern "C" fn ff5() {} // OK. 5 | -----^-----^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 6 | | | 7 | | `async` because of this 8 | `const` because of this 9 10error[E0706]: functions in traits cannot be declared `async` 11 --> $DIR/fn-header-semantic-fail.rs:17:9 12 | 13LL | async fn ft1(); 14 | -----^^^^^^^^^^ 15 | | 16 | `async` because of this 17 | 18 = note: `async` trait functions are not currently supported 19 = note: consider using the `async-trait` crate: https://crates.io/crates/async-trait 20 21error[E0379]: functions in traits cannot be declared const 22 --> $DIR/fn-header-semantic-fail.rs:19:9 23 | 24LL | const fn ft3(); 25 | ^^^^^ functions in traits cannot be const 26 27error[E0379]: functions in traits cannot be declared const 28 --> $DIR/fn-header-semantic-fail.rs:21:9 29 | 30LL | const async unsafe extern "C" fn ft5(); 31 | ^^^^^ functions in traits cannot be const 32 33error[E0706]: functions in traits cannot be declared `async` 34 --> $DIR/fn-header-semantic-fail.rs:21:9 35 | 36LL | const async unsafe extern "C" fn ft5(); 37 | ^^^^^^-----^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 38 | | 39 | `async` because of this 40 | 41 = note: `async` trait functions are not currently supported 42 = note: consider using the `async-trait` crate: https://crates.io/crates/async-trait 43 44error: functions cannot be both `const` and `async` 45 --> $DIR/fn-header-semantic-fail.rs:21:9 46 | 47LL | const async unsafe extern "C" fn ft5(); 48 | -----^-----^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 49 | | | 50 | | `async` because of this 51 | `const` because of this 52 53error[E0706]: functions in traits cannot be declared `async` 54 --> $DIR/fn-header-semantic-fail.rs:29:9 55 | 56LL | async fn ft1() {} 57 | -----^^^^^^^^^^^^ 58 | | 59 | `async` because of this 60 | 61 = note: `async` trait functions are not currently supported 62 = note: consider using the `async-trait` crate: https://crates.io/crates/async-trait 63 64error[E0379]: functions in traits cannot be declared const 65 --> $DIR/fn-header-semantic-fail.rs:32:9 66 | 67LL | const fn ft3() {} 68 | ^^^^^ functions in traits cannot be const 69 70error[E0379]: functions in traits cannot be declared const 71 --> $DIR/fn-header-semantic-fail.rs:34:9 72 | 73LL | const async unsafe extern "C" fn ft5() {} 74 | ^^^^^ functions in traits cannot be const 75 76error[E0706]: functions in traits cannot be declared `async` 77 --> $DIR/fn-header-semantic-fail.rs:34:9 78 | 79LL | const async unsafe extern "C" fn ft5() {} 80 | ^^^^^^-----^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 81 | | 82 | `async` because of this 83 | 84 = note: `async` trait functions are not currently supported 85 = note: consider using the `async-trait` crate: https://crates.io/crates/async-trait 86 87error: functions cannot be both `const` and `async` 88 --> $DIR/fn-header-semantic-fail.rs:34:9 89 | 90LL | const async unsafe extern "C" fn ft5() {} 91 | -----^-----^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 92 | | | 93 | | `async` because of this 94 | `const` because of this 95 96error: functions cannot be both `const` and `async` 97 --> $DIR/fn-header-semantic-fail.rs:46:9 98 | 99LL | const async unsafe extern "C" fn fi5() {} 100 | -----^-----^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 101 | | | 102 | | `async` because of this 103 | `const` because of this 104 105error: functions in `extern` blocks cannot have qualifiers 106 --> $DIR/fn-header-semantic-fail.rs:51:18 107 | 108LL | extern { 109 | ------ in this `extern` block 110LL | async fn fe1(); 111 | ---------^^^ 112 | | 113 | help: remove the qualifiers: `fn` 114 115error: functions in `extern` blocks cannot have qualifiers 116 --> $DIR/fn-header-semantic-fail.rs:52:19 117 | 118LL | extern { 119 | ------ in this `extern` block 120LL | async fn fe1(); 121LL | unsafe fn fe2(); 122 | ----------^^^ 123 | | 124 | help: remove the qualifiers: `fn` 125 126error: functions in `extern` blocks cannot have qualifiers 127 --> $DIR/fn-header-semantic-fail.rs:53:18 128 | 129LL | extern { 130 | ------ in this `extern` block 131... 132LL | const fn fe3(); 133 | ---------^^^ 134 | | 135 | help: remove the qualifiers: `fn` 136 137error: functions in `extern` blocks cannot have qualifiers 138 --> $DIR/fn-header-semantic-fail.rs:54:23 139 | 140LL | extern { 141 | ------ in this `extern` block 142... 143LL | extern "C" fn fe4(); 144 | --------------^^^ 145 | | 146 | help: remove the qualifiers: `fn` 147 148error: functions in `extern` blocks cannot have qualifiers 149 --> $DIR/fn-header-semantic-fail.rs:55:42 150 | 151LL | extern { 152 | ------ in this `extern` block 153... 154LL | const async unsafe extern "C" fn fe5(); 155 | ---------------------------------^^^ 156 | | 157 | help: remove the qualifiers: `fn` 158 159error: functions cannot be both `const` and `async` 160 --> $DIR/fn-header-semantic-fail.rs:55:9 161 | 162LL | const async unsafe extern "C" fn fe5(); 163 | -----^-----^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 164 | | | 165 | | `async` because of this 166 | `const` because of this 167 168error[E0053]: method `ft1` has an incompatible type for trait 169 --> $DIR/fn-header-semantic-fail.rs:29:24 170 | 171LL | async fn ft1(); 172 | - type in trait 173... 174LL | async fn ft1() {} 175 | ^ 176 | | 177 | the `Output` of this `async fn`'s found opaque type 178 | expected `()`, found opaque type 179 | 180 = note: expected fn pointer `fn()` 181 found fn pointer `fn() -> impl std::future::Future` 182 183error[E0053]: method `ft5` has an incompatible type for trait 184 --> $DIR/fn-header-semantic-fail.rs:34:48 185 | 186LL | const async unsafe extern "C" fn ft5(); 187 | - type in trait 188... 189LL | const async unsafe extern "C" fn ft5() {} 190 | ^ 191 | | 192 | the `Output` of this `async fn`'s found opaque type 193 | expected `()`, found opaque type 194 | 195 = note: expected fn pointer `unsafe extern "C" fn()` 196 found fn pointer `unsafe extern "C" fn() -> impl std::future::Future` 197 198error: aborting due to 20 previous errors 199 200Some errors have detailed explanations: E0053, E0379, E0706. 201For more information about an error, try `rustc --explain E0053`.