| 1 |
error: can only #[wasm_bindgen] public functions |
| 2 |
--> $DIR/invalid-items.rs:4:1 |
| 3 |
| |
| 4 |
4 | fn foo() {} |
| 5 |
| ^^^^^^^^^^^ |
| 6 |
|
| 7 |
error: can only #[wasm_bindgen] non-const functions |
| 8 |
--> $DIR/invalid-items.rs:7:5 |
| 9 |
| |
| 10 |
7 | pub const fn foo2() {} |
| 11 |
| ^^^^^ |
| 12 |
|
| 13 |
error: structs with #[wasm_bindgen] cannot have lifetime or type parameters currently |
| 14 |
--> $DIR/invalid-items.rs:10:11 |
| 15 |
| |
| 16 |
10 | struct Foo<T>(T); |
| 17 |
| ^^^ |
| 18 |
|
| 19 |
error: cannot import mutable globals yet |
| 20 |
--> $DIR/invalid-items.rs:14:12 |
| 21 |
| |
| 22 |
14 | static mut FOO: u32; |
| 23 |
| ^^^ |
| 24 |
|
| 25 |
error: can't #[wasm_bindgen] variadic functions |
| 26 |
--> $DIR/invalid-items.rs:16:25 |
| 27 |
| |
| 28 |
16 | pub fn foo3(x: i32, ...); |
| 29 |
| ^^^ |
| 30 |
|
| 31 |
error: only foreign mods with the `C` ABI are allowed |
| 32 |
--> $DIR/invalid-items.rs:20:8 |
| 33 |
| |
| 34 |
20 | extern "system" { |
| 35 |
| ^^^^^^^^ |
| 36 |
|
| 37 |
error: can't #[wasm_bindgen] functions with lifetime or type parameters |
| 38 |
--> $DIR/invalid-items.rs:24:12 |
| 39 |
| |
| 40 |
24 | pub fn foo4<T>() {} |
| 41 |
| ^^^ |
| 42 |
|
| 43 |
error: can't #[wasm_bindgen] functions with lifetime or type parameters |
| 44 |
--> $DIR/invalid-items.rs:26:12 |
| 45 |
| |
| 46 |
26 | pub fn foo5<'a>() {} |
| 47 |
| ^^^^ |
| 48 |
|
| 49 |
error: can't #[wasm_bindgen] functions with lifetime or type parameters |
| 50 |
--> $DIR/invalid-items.rs:28:12 |
| 51 |
| |
| 52 |
28 | pub fn foo6<'a, T>() {} |
| 53 |
| ^^^^^^^ |
| 54 |
|
| 55 |
error: #[wasm_bindgen] can only be applied to a function, struct, enum, impl, or extern block |
| 56 |
--> $DIR/invalid-items.rs:31:1 |
| 57 |
| |
| 58 |
31 | trait X {} |
| 59 |
| ^^^^^^^^^^ |