|
| 1 | +error: multiple `#[splat]`s are not allowed in the same function |
| 2 | + --> $DIR/splat-invalid.rs:7:19 |
| 3 | + | |
| 4 | +LL | fn multisplat_bad(#[splat] (_a, _b): (u32, i8), #[splat] (_c, _d): (u32, i8)) {} |
| 5 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 6 | + | |
| 7 | + = help: remove `#[splat]` from all but one argument |
| 8 | + |
| 9 | +error: `...` and `#[splat]` are not allowed in the same function |
| 10 | + --> $DIR/splat-invalid.rs:10:37 |
| 11 | + | |
| 12 | +LL | unsafe extern "C" fn splat_variadic(#[splat] (_a, _b): (u32, i8), varargs: ...) {} |
| 13 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^ |
| 14 | + | |
| 15 | + = help: remove `#[splat]` or remove `...` |
| 16 | + |
| 17 | +error: `...` must be the last argument of a C-variadic function |
| 18 | + --> $DIR/splat-invalid.rs:13:38 |
| 19 | + | |
| 20 | +LL | unsafe extern "C" fn splat_variadic2(varargs: ..., #[splat] (_a, _b): (u32, i8)) {} |
| 21 | + | ^^^^^^^^^^^^ |
| 22 | + |
| 23 | +error: `...` and `#[splat]` are not allowed in the same function |
| 24 | + --> $DIR/splat-invalid.rs:13:38 |
| 25 | + | |
| 26 | +LL | unsafe extern "C" fn splat_variadic2(varargs: ..., #[splat] (_a, _b): (u32, i8)) {} |
| 27 | + | ^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 28 | + | |
| 29 | + = help: remove `#[splat]` or remove `...` |
| 30 | + |
| 31 | +error: incorrect function inside `extern` block |
| 32 | + --> $DIR/splat-invalid.rs:18:8 |
| 33 | + | |
| 34 | +LL | extern "C" { |
| 35 | + | ---------- `extern` blocks define existing foreign functions and functions inside of them cannot have a body |
| 36 | +LL | fn splat_variadic3(#[splat] (_a, _b): (u32, i8), ...) {} |
| 37 | + | ^^^^^^^^^^^^^^^ cannot have a body -- help: remove the invalid body: `;` |
| 38 | + | |
| 39 | + = 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 |
| 40 | + = note: for more information, visit https://doc.rust-lang.org/std/keyword.extern.html |
| 41 | + |
| 42 | +error: `...` and `#[splat]` are not allowed in the same function |
| 43 | + --> $DIR/splat-invalid.rs:18:24 |
| 44 | + | |
| 45 | +LL | fn splat_variadic3(#[splat] (_a, _b): (u32, i8), ...) {} |
| 46 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ |
| 47 | + | |
| 48 | + = help: remove `#[splat]` or remove `...` |
| 49 | + |
| 50 | +error: incorrect function inside `extern` block |
| 51 | + --> $DIR/splat-invalid.rs:22:8 |
| 52 | + | |
| 53 | +LL | extern "C" { |
| 54 | + | ---------- `extern` blocks define existing foreign functions and functions inside of them cannot have a body |
| 55 | +... |
| 56 | +LL | fn splat_variadic4(..., #[splat] (_a, _b): (u32, i8)) {} |
| 57 | + | ^^^^^^^^^^^^^^^ cannot have a body -- help: remove the invalid body: `;` |
| 58 | + | |
| 59 | + = 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 |
| 60 | + = note: for more information, visit https://doc.rust-lang.org/std/keyword.extern.html |
| 61 | + |
| 62 | +error: `...` must be the last argument of a C-variadic function |
| 63 | + --> $DIR/splat-invalid.rs:22:24 |
| 64 | + | |
| 65 | +LL | fn splat_variadic4(..., #[splat] (_a, _b): (u32, i8)) {} |
| 66 | + | ^^^ |
| 67 | + |
| 68 | +error: `...` and `#[splat]` are not allowed in the same function |
| 69 | + --> $DIR/splat-invalid.rs:22:24 |
| 70 | + | |
| 71 | +LL | fn splat_variadic4(..., #[splat] (_a, _b): (u32, i8)) {} |
| 72 | + | ^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 73 | + | |
| 74 | + = help: remove `#[splat]` or remove `...` |
| 75 | + |
| 76 | +error: aborting due to 9 previous errors |
| 77 | + |
0 commit comments