wasm-bindgen/crates/macro/ui-tests/invalid-items.stderr

69 lines
1.6 KiB
Plaintext
Raw Normal View History

error: can only #[wasm_bindgen] public functions
2019-01-02 19:35:01 +03:00
--> $DIR/invalid-items.rs:8:1
|
2019-01-02 19:35:01 +03:00
8 | fn foo() {}
| ^^^^^^^^^^^
error: can only #[wasm_bindgen] safe functions
2019-01-02 19:35:01 +03:00
--> $DIR/invalid-items.rs:11:5
|
11 | pub unsafe fn foo1() {}
| ^^^^^^
error: can only #[wasm_bindgen] non-const functions
2019-01-02 19:35:01 +03:00
--> $DIR/invalid-items.rs:14:5
|
2019-01-02 19:35:01 +03:00
14 | pub const fn foo2() {}
| ^^^^^
error: structs with #[wasm_bindgen] cannot have lifetime or type parameters currently
2019-01-02 19:35:01 +03:00
--> $DIR/invalid-items.rs:17:11
|
2019-01-02 19:35:01 +03:00
17 | struct Foo<T>(T);
| ^^^
error: cannot import mutable globals yet
2019-01-02 19:35:01 +03:00
--> $DIR/invalid-items.rs:21:12
|
2019-01-02 19:35:01 +03:00
21 | static mut FOO: u32;
| ^^^
2019-03-04 05:14:57 +03:00
error: can't #[wasm_bindgen] variadic functions
--> $DIR/invalid-items.rs:23:25
|
23 | pub fn foo3(x: i32, ...);
| ^^^
error: only foreign mods with the `C` ABI are allowed
2019-03-04 05:14:57 +03:00
--> $DIR/invalid-items.rs:27:8
|
2019-03-04 05:14:57 +03:00
27 | extern "system" {
| ^^^^^^^^
error: can't #[wasm_bindgen] functions with lifetime or type parameters
2019-03-04 05:14:57 +03:00
--> $DIR/invalid-items.rs:31:12
|
2019-03-04 05:14:57 +03:00
31 | pub fn foo4<T>() {}
| ^^^
error: can't #[wasm_bindgen] functions with lifetime or type parameters
2019-03-04 05:14:57 +03:00
--> $DIR/invalid-items.rs:33:12
|
2019-03-04 05:14:57 +03:00
33 | pub fn foo5<'a>() {}
| ^^^^
error: can't #[wasm_bindgen] functions with lifetime or type parameters
2019-03-04 05:14:57 +03:00
--> $DIR/invalid-items.rs:35:12
|
2019-03-04 05:14:57 +03:00
35 | pub fn foo6<'a, T>() {}
| ^^^^^^^
error: #[wasm_bindgen] can only be applied to a function, struct, enum, impl, or extern block
2019-03-04 05:14:57 +03:00
--> $DIR/invalid-items.rs:38:1
|
2019-03-04 05:14:57 +03:00
38 | trait X {}
| ^^^^^^^^^^
2019-03-04 05:14:57 +03:00
error: aborting due to 11 previous errors