summaryrefslogtreecommitdiffstats
path: root/vendor/wasm-bindgen-macro/ui-tests/invalid-items.stderr
blob: 1800ade29d70f0255f11ce5b13e76fd8cb015455 (plain)
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
error: can only #[wasm_bindgen] public functions
 --> $DIR/invalid-items.rs:4:1
  |
4 | fn foo() {}
  | ^^^^^^^^^^^

error: can only #[wasm_bindgen] non-const functions
 --> $DIR/invalid-items.rs:7:5
  |
7 | pub const fn foo2() {}
  |     ^^^^^

error: structs with #[wasm_bindgen] cannot have lifetime or type parameters currently
  --> $DIR/invalid-items.rs:10:11
   |
10 | struct Foo<T>(T);
   |           ^^^

error: cannot import mutable globals yet
  --> $DIR/invalid-items.rs:14:12
   |
14 |     static mut FOO: u32;
   |            ^^^

error: can't #[wasm_bindgen] variadic functions
  --> $DIR/invalid-items.rs:16:25
   |
16 |     pub fn foo3(x: i32, ...);
   |                         ^^^

error: only foreign mods with the `C` ABI are allowed
  --> $DIR/invalid-items.rs:20:8
   |
20 | extern "system" {
   |        ^^^^^^^^

error: can't #[wasm_bindgen] functions with lifetime or type parameters
  --> $DIR/invalid-items.rs:24:12
   |
24 | pub fn foo4<T>() {}
   |            ^^^

error: can't #[wasm_bindgen] functions with lifetime or type parameters
  --> $DIR/invalid-items.rs:26:12
   |
26 | pub fn foo5<'a>() {}
   |            ^^^^

error: can't #[wasm_bindgen] functions with lifetime or type parameters
  --> $DIR/invalid-items.rs:28:12
   |
28 | pub fn foo6<'a, T>() {}
   |            ^^^^^^^

error: #[wasm_bindgen] can only be applied to a function, struct, enum, impl, or extern block
  --> $DIR/invalid-items.rs:31:1
   |
31 | trait X {}
   | ^^^^^^^^^^