mirror of
https://github.com/fluencelabs/wasm-bindgen
synced 2025-06-21 08:41:35 +00:00
Update UI tests
This commit is contained in:
@ -1,3 +1,5 @@
|
|||||||
|
#![crate_type = "rlib"]
|
||||||
|
|
||||||
extern crate wasm_bindgen;
|
extern crate wasm_bindgen;
|
||||||
|
|
||||||
use wasm_bindgen::prelude::*;
|
use wasm_bindgen::prelude::*;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
error: unknown attribute
|
error: unknown attribute
|
||||||
--> $DIR/attribute-fails-to-parse.rs:5:16
|
--> $DIR/attribute-fails-to-parse.rs:7:16
|
||||||
|
|
|
|
||||||
5 | #[wasm_bindgen(nonsense)]
|
7 | #[wasm_bindgen(nonsense)]
|
||||||
| ^^^^^^^^
|
| ^^^^^^^^
|
||||||
|
|
||||||
error: aborting due to previous error
|
error: aborting due to previous error
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
#![crate_type = "rlib"]
|
||||||
|
|
||||||
extern crate wasm_bindgen;
|
extern crate wasm_bindgen;
|
||||||
|
|
||||||
use wasm_bindgen::prelude::*;
|
use wasm_bindgen::prelude::*;
|
||||||
|
@ -1,19 +1,19 @@
|
|||||||
error: cannot return a borrowed ref with #[wasm_bindgen]
|
error: cannot return a borrowed ref with #[wasm_bindgen]
|
||||||
--> $DIR/bad-signatures.rs:6:17
|
--> $DIR/bad-signatures.rs:8:17
|
||||||
|
|
|
|
||||||
6 | pub fn foo() -> &u32 {}
|
8 | pub fn foo() -> &u32 {}
|
||||||
| ^^^^
|
| ^^^^
|
||||||
|
|
||||||
error: unsupported pattern in #[wasm_bindgen] imported function
|
error: unsupported pattern in #[wasm_bindgen] imported function
|
||||||
--> $DIR/bad-signatures.rs:10:12
|
--> $DIR/bad-signatures.rs:12:12
|
||||||
|
|
|
|
||||||
10 | fn foo(Foo(x): Foo);
|
12 | fn foo(Foo(x): Foo);
|
||||||
| ^^^^^^
|
| ^^^^^^
|
||||||
|
|
||||||
error: cannot return references in #[wasm_bindgen] imports yet
|
error: cannot return references in #[wasm_bindgen] imports yet
|
||||||
--> $DIR/bad-signatures.rs:12:17
|
--> $DIR/bad-signatures.rs:14:17
|
||||||
|
|
|
|
||||||
12 | fn foo() -> &u32;
|
14 | fn foo() -> &u32;
|
||||||
| ^^^^
|
| ^^^^
|
||||||
|
|
||||||
error: aborting due to 3 previous errors
|
error: aborting due to 3 previous errors
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
#![crate_type = "rlib"]
|
||||||
|
|
||||||
extern crate wasm_bindgen;
|
extern crate wasm_bindgen;
|
||||||
|
|
||||||
use wasm_bindgen::prelude::*;
|
use wasm_bindgen::prelude::*;
|
||||||
|
@ -1,19 +1,19 @@
|
|||||||
error: unknown attribute
|
error: unknown attribute
|
||||||
--> $DIR/invalid-attr.rs:5:16
|
--> $DIR/invalid-attr.rs:7:16
|
||||||
|
|
|
|
||||||
5 | #[wasm_bindgen(x)]
|
7 | #[wasm_bindgen(x)]
|
||||||
| ^
|
| ^
|
||||||
|
|
||||||
error: unknown attribute
|
error: unknown attribute
|
||||||
--> $DIR/invalid-attr.rs:10:20
|
--> $DIR/invalid-attr.rs:12:20
|
||||||
|
|
|
|
||||||
10 | #[wasm_bindgen(y)]
|
12 | #[wasm_bindgen(y)]
|
||||||
| ^
|
| ^
|
||||||
|
|
||||||
error: malformed #[wasm_bindgen] attribute
|
error: malformed #[wasm_bindgen] attribute
|
||||||
--> $DIR/invalid-attr.rs:13:5
|
--> $DIR/invalid-attr.rs:15:5
|
||||||
|
|
|
|
||||||
13 | #[wasm_bindgen { }]
|
15 | #[wasm_bindgen { }]
|
||||||
| ^^^^^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
error: aborting due to 3 previous errors
|
error: aborting due to 3 previous errors
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
#![crate_type = "rlib"]
|
||||||
|
|
||||||
extern crate wasm_bindgen;
|
extern crate wasm_bindgen;
|
||||||
|
|
||||||
use wasm_bindgen::prelude::*;
|
use wasm_bindgen::prelude::*;
|
||||||
|
@ -1,25 +1,25 @@
|
|||||||
error: only public enums are allowed with #[wasm_bindgen]
|
error: only public enums are allowed with #[wasm_bindgen]
|
||||||
--> $DIR/invalid-enums.rs:6:1
|
--> $DIR/invalid-enums.rs:8:1
|
||||||
|
|
|
|
||||||
6 | enum A {}
|
8 | enum A {}
|
||||||
| ^^^^^^^^^
|
| ^^^^^^^^^
|
||||||
|
|
||||||
error: only C-Style enums allowed with #[wasm_bindgen]
|
error: only C-Style enums allowed with #[wasm_bindgen]
|
||||||
--> $DIR/invalid-enums.rs:10:6
|
--> $DIR/invalid-enums.rs:12:6
|
||||||
|
|
|
|
||||||
10 | D(u32),
|
12 | D(u32),
|
||||||
| ^^^^^
|
| ^^^^^
|
||||||
|
|
||||||
error: enums with #[wasm_bidngen] may only have number literal values
|
error: enums with #[wasm_bidngen] may only have number literal values
|
||||||
--> $DIR/invalid-enums.rs:15:9
|
--> $DIR/invalid-enums.rs:17:9
|
||||||
|
|
|
|
||||||
15 | X = 1 + 3,
|
17 | X = 1 + 3,
|
||||||
| ^^^^^
|
| ^^^^^
|
||||||
|
|
||||||
error: enums with #[wasm_bindgen] can only support numbers that can be represented as u32
|
error: enums with #[wasm_bindgen] can only support numbers that can be represented as u32
|
||||||
--> $DIR/invalid-enums.rs:20:9
|
--> $DIR/invalid-enums.rs:22:9
|
||||||
|
|
|
|
||||||
20 | X = 4294967296,
|
22 | X = 4294967296,
|
||||||
| ^^^^^^^^^^
|
| ^^^^^^^^^^
|
||||||
|
|
||||||
error: aborting due to 4 previous errors
|
error: aborting due to 4 previous errors
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
#![crate_type = "rlib"]
|
||||||
|
|
||||||
extern crate wasm_bindgen;
|
extern crate wasm_bindgen;
|
||||||
|
|
||||||
use wasm_bindgen::prelude::*;
|
use wasm_bindgen::prelude::*;
|
||||||
|
@ -1,91 +1,91 @@
|
|||||||
error: it is currently not sound to use lifetimes in function signatures
|
error: it is currently not sound to use lifetimes in function signatures
|
||||||
--> $DIR/invalid-imports.rs:9:16
|
--> $DIR/invalid-imports.rs:11:16
|
||||||
|
|
|
|
||||||
9 | fn f() -> &'static u32;
|
11 | fn f() -> &'static u32;
|
||||||
| ^^^^^^^
|
| ^^^^^^^
|
||||||
|
|
||||||
error: imported methods must have at least one argument
|
error: imported methods must have at least one argument
|
||||||
--> $DIR/invalid-imports.rs:12:5
|
--> $DIR/invalid-imports.rs:14:5
|
||||||
|
|
|
|
||||||
12 | fn f1();
|
14 | fn f1();
|
||||||
| ^^^^^^^^
|
| ^^^^^^^^
|
||||||
|
|
||||||
error: first argument of method must be a shared reference
|
error: first argument of method must be a shared reference
|
||||||
--> $DIR/invalid-imports.rs:14:14
|
--> $DIR/invalid-imports.rs:16:14
|
||||||
|
|
|
|
||||||
14 | fn f2(x: u32);
|
16 | fn f2(x: u32);
|
||||||
| ^^^
|
| ^^^
|
||||||
|
|
||||||
error: first argument of method must be a path
|
error: first argument of method must be a path
|
||||||
--> $DIR/invalid-imports.rs:16:14
|
--> $DIR/invalid-imports.rs:18:14
|
||||||
|
|
|
|
||||||
16 | fn f3(x: &&u32);
|
18 | fn f3(x: &&u32);
|
||||||
| ^^^^^
|
| ^^^^^
|
||||||
|
|
||||||
error: multi-segment paths are not supported yet
|
error: multi-segment paths are not supported yet
|
||||||
--> $DIR/invalid-imports.rs:18:15
|
--> $DIR/invalid-imports.rs:20:15
|
||||||
|
|
|
|
||||||
18 | fn f4(x: &foo::Bar);
|
20 | fn f4(x: &foo::Bar);
|
||||||
| ^^^^^^^^
|
| ^^^^^^^^
|
||||||
|
|
||||||
error: global paths are not supported yet
|
error: global paths are not supported yet
|
||||||
--> $DIR/invalid-imports.rs:20:15
|
|
||||||
|
|
|
||||||
20 | fn f4(x: &::Bar);
|
|
||||||
| ^^^^^
|
|
||||||
|
|
||||||
error: paths with type parameters are not supported yet
|
|
||||||
--> $DIR/invalid-imports.rs:22:15
|
--> $DIR/invalid-imports.rs:22:15
|
||||||
|
|
|
|
||||||
22 | fn f4(x: &Bar<T>);
|
22 | fn f4(x: &::Bar);
|
||||||
| ^^^^^^
|
| ^^^^^
|
||||||
|
|
||||||
error: paths with type parameters are not supported yet
|
error: paths with type parameters are not supported yet
|
||||||
--> $DIR/invalid-imports.rs:24:15
|
--> $DIR/invalid-imports.rs:24:15
|
||||||
|
|
|
|
||||||
24 | fn f4(x: &Fn(T));
|
24 | fn f4(x: &Bar<T>);
|
||||||
|
| ^^^^^^
|
||||||
|
|
||||||
|
error: paths with type parameters are not supported yet
|
||||||
|
--> $DIR/invalid-imports.rs:26:15
|
||||||
|
|
|
||||||
|
26 | fn f4(x: &Fn(T));
|
||||||
| ^^^^^
|
| ^^^^^
|
||||||
|
|
||||||
error: constructor returns must be bare types
|
error: constructor returns must be bare types
|
||||||
--> $DIR/invalid-imports.rs:27:5
|
--> $DIR/invalid-imports.rs:29:5
|
||||||
|
|
|
|
||||||
27 | fn f();
|
29 | fn f();
|
||||||
| ^^^^^^^
|
| ^^^^^^^
|
||||||
|
|
||||||
error: global paths are not supported yet
|
error: global paths are not supported yet
|
||||||
--> $DIR/invalid-imports.rs:29:15
|
--> $DIR/invalid-imports.rs:31:15
|
||||||
|
|
|
|
||||||
29 | fn f() -> ::Bar;
|
31 | fn f() -> ::Bar;
|
||||||
| ^^^^^
|
| ^^^^^
|
||||||
|
|
||||||
error: return value of constructor must be a bare path
|
error: return value of constructor must be a bare path
|
||||||
--> $DIR/invalid-imports.rs:31:5
|
--> $DIR/invalid-imports.rs:33:5
|
||||||
|
|
|
|
||||||
31 | fn f() -> &Bar;
|
33 | fn f() -> &Bar;
|
||||||
| ^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
error: must be Result<...>
|
|
||||||
--> $DIR/invalid-imports.rs:34:15
|
|
||||||
|
|
|
||||||
34 | fn f() -> u32;
|
|
||||||
| ^^^
|
|
||||||
|
|
||||||
error: must be Result<...>
|
error: must be Result<...>
|
||||||
--> $DIR/invalid-imports.rs:36:15
|
--> $DIR/invalid-imports.rs:36:15
|
||||||
|
|
|
|
||||||
36 | fn f() -> &u32;
|
36 | fn f() -> u32;
|
||||||
|
| ^^^
|
||||||
|
|
||||||
|
error: must be Result<...>
|
||||||
|
--> $DIR/invalid-imports.rs:38:15
|
||||||
|
|
|
||||||
|
38 | fn f() -> &u32;
|
||||||
| ^^^^
|
| ^^^^
|
||||||
|
|
||||||
error: must have at least one generic parameter
|
error: must have at least one generic parameter
|
||||||
--> $DIR/invalid-imports.rs:38:15
|
--> $DIR/invalid-imports.rs:40:15
|
||||||
|
|
|
|
||||||
38 | fn f() -> Result<>;
|
40 | fn f() -> Result<>;
|
||||||
| ^^^^^^^^
|
| ^^^^^^^^
|
||||||
|
|
||||||
error: it is currently not sound to use lifetimes in function signatures
|
error: it is currently not sound to use lifetimes in function signatures
|
||||||
--> $DIR/invalid-imports.rs:40:22
|
--> $DIR/invalid-imports.rs:42:22
|
||||||
|
|
|
|
||||||
40 | fn f() -> Result<'a>;
|
42 | fn f() -> Result<'a>;
|
||||||
| ^^
|
| ^^
|
||||||
|
|
||||||
error: aborting due to 15 previous errors
|
error: aborting due to 15 previous errors
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
#![crate_type = "rlib"]
|
||||||
|
|
||||||
extern crate wasm_bindgen;
|
extern crate wasm_bindgen;
|
||||||
|
|
||||||
use wasm_bindgen::prelude::*;
|
use wasm_bindgen::prelude::*;
|
||||||
|
@ -1,67 +1,67 @@
|
|||||||
error: can only #[wasm_bindgen] public functions
|
error: can only #[wasm_bindgen] public functions
|
||||||
--> $DIR/invalid-items.rs:6:1
|
--> $DIR/invalid-items.rs:8:1
|
||||||
|
|
|
|
||||||
6 | fn foo() {}
|
8 | fn foo() {}
|
||||||
| ^^^^^^^^^^^
|
| ^^^^^^^^^^^
|
||||||
|
|
||||||
error: can only #[wasm_bindgen] safe functions
|
error: can only #[wasm_bindgen] safe functions
|
||||||
--> $DIR/invalid-items.rs:9:5
|
--> $DIR/invalid-items.rs:11:5
|
||||||
|
|
|
|
||||||
9 | pub unsafe fn foo1() {}
|
11 | pub unsafe fn foo1() {}
|
||||||
| ^^^^^^
|
| ^^^^^^
|
||||||
|
|
||||||
error: can only #[wasm_bindgen] non-const functions
|
error: can only #[wasm_bindgen] non-const functions
|
||||||
--> $DIR/invalid-items.rs:12:5
|
--> $DIR/invalid-items.rs:14:5
|
||||||
|
|
|
|
||||||
12 | pub const fn foo2() {}
|
14 | pub const fn foo2() {}
|
||||||
| ^^^^^
|
| ^^^^^
|
||||||
|
|
||||||
error: structs with #[wasm_bindgen] cannot have lifetime or type parameters currently
|
error: structs with #[wasm_bindgen] cannot have lifetime or type parameters currently
|
||||||
--> $DIR/invalid-items.rs:15:11
|
--> $DIR/invalid-items.rs:17:11
|
||||||
|
|
|
|
||||||
15 | struct Foo<T>(T);
|
17 | struct Foo<T>(T);
|
||||||
| ^^^
|
| ^^^
|
||||||
|
|
||||||
error: cannot import mutable globals yet
|
error: cannot import mutable globals yet
|
||||||
--> $DIR/invalid-items.rs:19:12
|
--> $DIR/invalid-items.rs:21:12
|
||||||
|
|
|
|
||||||
19 | static mut FOO: u32;
|
21 | static mut FOO: u32;
|
||||||
| ^^^
|
| ^^^
|
||||||
|
|
||||||
error: can't #[wasm_bindgen] variadic functions
|
error: can't #[wasm_bindgen] variadic functions
|
||||||
--> $DIR/invalid-items.rs:21:25
|
--> $DIR/invalid-items.rs:23:25
|
||||||
|
|
|
|
||||||
21 | pub fn foo3(x: i32, ...);
|
23 | pub fn foo3(x: i32, ...);
|
||||||
| ^^^
|
| ^^^
|
||||||
|
|
||||||
error: only foreign mods with the `C` ABI are allowed
|
error: only foreign mods with the `C` ABI are allowed
|
||||||
--> $DIR/invalid-items.rs:25:8
|
--> $DIR/invalid-items.rs:27:8
|
||||||
|
|
|
|
||||||
25 | extern "system" {
|
27 | extern "system" {
|
||||||
| ^^^^^^^^
|
| ^^^^^^^^
|
||||||
|
|
||||||
error: can't #[wasm_bindgen] functions with lifetime or type parameters
|
|
||||||
--> $DIR/invalid-items.rs:29:12
|
|
||||||
|
|
|
||||||
29 | pub fn foo4<T>() {}
|
|
||||||
| ^^^
|
|
||||||
|
|
||||||
error: can't #[wasm_bindgen] functions with lifetime or type parameters
|
error: can't #[wasm_bindgen] functions with lifetime or type parameters
|
||||||
--> $DIR/invalid-items.rs:31:12
|
--> $DIR/invalid-items.rs:31:12
|
||||||
|
|
|
|
||||||
31 | pub fn foo5<'a>() {}
|
31 | pub fn foo4<T>() {}
|
||||||
| ^^^^
|
| ^^^
|
||||||
|
|
||||||
error: can't #[wasm_bindgen] functions with lifetime or type parameters
|
error: can't #[wasm_bindgen] functions with lifetime or type parameters
|
||||||
--> $DIR/invalid-items.rs:33:12
|
--> $DIR/invalid-items.rs:33:12
|
||||||
|
|
|
|
||||||
33 | pub fn foo6<'a, T>() {}
|
33 | pub fn foo5<'a>() {}
|
||||||
|
| ^^^^
|
||||||
|
|
||||||
|
error: can't #[wasm_bindgen] functions with lifetime or type parameters
|
||||||
|
--> $DIR/invalid-items.rs:35:12
|
||||||
|
|
|
||||||
|
35 | pub fn foo6<'a, T>() {}
|
||||||
| ^^^^^^^
|
| ^^^^^^^
|
||||||
|
|
||||||
error: #[wasm_bindgen] can only be applied to a function, struct, enum, impl, or extern block
|
error: #[wasm_bindgen] can only be applied to a function, struct, enum, impl, or extern block
|
||||||
--> $DIR/invalid-items.rs:36:1
|
--> $DIR/invalid-items.rs:38:1
|
||||||
|
|
|
|
||||||
36 | trait X {}
|
38 | trait X {}
|
||||||
| ^^^^^^^^^^
|
| ^^^^^^^^^^
|
||||||
|
|
||||||
error: aborting due to 11 previous errors
|
error: aborting due to 11 previous errors
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
#![crate_type = "rlib"]
|
||||||
|
|
||||||
extern crate wasm_bindgen;
|
extern crate wasm_bindgen;
|
||||||
|
|
||||||
use wasm_bindgen::prelude::*;
|
use wasm_bindgen::prelude::*;
|
||||||
|
@ -1,61 +1,61 @@
|
|||||||
error: #[wasm_bindgen] default impls are not supported
|
error: #[wasm_bindgen] default impls are not supported
|
||||||
--> $DIR/invalid-methods.rs:9:1
|
--> $DIR/invalid-methods.rs:11:1
|
||||||
|
|
|
|
||||||
9 | default impl A {
|
11 | default impl A {
|
||||||
| ^^^^^^^
|
| ^^^^^^^
|
||||||
|
|
||||||
error: #[wasm_bindgen] unsafe impls are not supported
|
error: #[wasm_bindgen] unsafe impls are not supported
|
||||||
--> $DIR/invalid-methods.rs:13:1
|
--> $DIR/invalid-methods.rs:15:1
|
||||||
|
|
|
|
||||||
13 | unsafe impl A {
|
15 | unsafe impl A {
|
||||||
| ^^^^^^
|
| ^^^^^^
|
||||||
|
|
||||||
error: #[wasm_bindgen] trait impls are not supported
|
error: #[wasm_bindgen] trait impls are not supported
|
||||||
--> $DIR/invalid-methods.rs:17:6
|
--> $DIR/invalid-methods.rs:19:6
|
||||||
|
|
|
|
||||||
17 | impl Clone for A {
|
19 | impl Clone for A {
|
||||||
| ^^^^^
|
| ^^^^^
|
||||||
|
|
||||||
error: #[wasm_bindgen] generic impls aren't supported
|
error: #[wasm_bindgen] generic impls aren't supported
|
||||||
--> $DIR/invalid-methods.rs:21:5
|
--> $DIR/invalid-methods.rs:23:5
|
||||||
|
|
|
|
||||||
21 | impl<T> A {
|
23 | impl<T> A {
|
||||||
| ^^^
|
| ^^^
|
||||||
|
|
||||||
error: unsupported self type in #[wasm_bindgen] impl
|
error: unsupported self type in #[wasm_bindgen] impl
|
||||||
--> $DIR/invalid-methods.rs:25:6
|
--> $DIR/invalid-methods.rs:27:6
|
||||||
|
|
|
|
||||||
25 | impl &'static A {
|
27 | impl &'static A {
|
||||||
| ^^^^^^^^^^
|
| ^^^^^^^^^^
|
||||||
|
|
||||||
error: const definitions aren't supported with #[wasm_bindgen]
|
error: const definitions aren't supported with #[wasm_bindgen]
|
||||||
--> $DIR/invalid-methods.rs:32:5
|
--> $DIR/invalid-methods.rs:34:5
|
||||||
|
|
|
|
||||||
32 | const X: u32 = 3;
|
34 | const X: u32 = 3;
|
||||||
| ^^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
error: type definitions in impls aren't supported with #[wasm_bindgen]
|
error: type definitions in impls aren't supported with #[wasm_bindgen]
|
||||||
--> $DIR/invalid-methods.rs:33:5
|
--> $DIR/invalid-methods.rs:35:5
|
||||||
|
|
|
|
||||||
33 | type Y = u32;
|
35 | type Y = u32;
|
||||||
| ^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^
|
||||||
|
|
||||||
error: macros in impls aren't supported
|
error: macros in impls aren't supported
|
||||||
--> $DIR/invalid-methods.rs:34:5
|
--> $DIR/invalid-methods.rs:36:5
|
||||||
|
|
|
|
||||||
34 | x!();
|
36 | x!();
|
||||||
| ^^^^^
|
| ^^^^^
|
||||||
|
|
||||||
error: can only #[wasm_bindgen] non-const functions
|
error: can only #[wasm_bindgen] non-const functions
|
||||||
--> $DIR/invalid-methods.rs:39:9
|
--> $DIR/invalid-methods.rs:41:9
|
||||||
|
|
|
|
||||||
39 | pub const fn foo() {}
|
41 | pub const fn foo() {}
|
||||||
| ^^^^^
|
| ^^^^^
|
||||||
|
|
||||||
error: can only bindgen safe functions
|
error: can only bindgen safe functions
|
||||||
--> $DIR/invalid-methods.rs:40:9
|
--> $DIR/invalid-methods.rs:42:9
|
||||||
|
|
|
|
||||||
40 | pub unsafe fn foo() {}
|
42 | pub unsafe fn foo() {}
|
||||||
| ^^^^^^
|
| ^^^^^^
|
||||||
|
|
||||||
error: aborting due to 10 previous errors
|
error: aborting due to 10 previous errors
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
#![crate_type = "rlib"]
|
||||||
|
|
||||||
extern crate wasm_bindgen;
|
extern crate wasm_bindgen;
|
||||||
|
|
||||||
use wasm_bindgen::prelude::*;
|
use wasm_bindgen::prelude::*;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
error: setters must start with `set_`, found: a
|
error: setters must start with `set_`, found: a
|
||||||
--> $DIR/invalid-setter.rs:10:8
|
--> $DIR/invalid-setter.rs:12:8
|
||||||
|
|
|
|
||||||
10 | fn a(this: &A, b: i32);
|
12 | fn a(this: &A, b: i32);
|
||||||
| ^
|
| ^
|
||||||
|
|
||||||
error: aborting due to previous error
|
error: aborting due to previous error
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
#![crate_type = "rlib"]
|
||||||
|
|
||||||
extern crate wasm_bindgen;
|
extern crate wasm_bindgen;
|
||||||
|
|
||||||
use wasm_bindgen::prelude::*;
|
use wasm_bindgen::prelude::*;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
error: can only #[wasm_bindgen] public functions
|
error: can only #[wasm_bindgen] public functions
|
||||||
--> $DIR/non-public-function.rs:6:1
|
--> $DIR/non-public-function.rs:8:1
|
||||||
|
|
|
|
||||||
6 | fn foo() {}
|
8 | fn foo() {}
|
||||||
| ^^^^^^^^^^^
|
| ^^^^^^^^^^^
|
||||||
|
|
||||||
error: aborting due to previous error
|
error: aborting due to previous error
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
#![crate_type = "rlib"]
|
||||||
|
|
||||||
extern crate wasm_bindgen;
|
extern crate wasm_bindgen;
|
||||||
|
|
||||||
use wasm_bindgen::prelude::*;
|
use wasm_bindgen::prelude::*;
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
error: the start function cannot have arguments
|
error: the start function cannot have arguments
|
||||||
--> $DIR/start-function.rs:9:13
|
--> $DIR/start-function.rs:11:13
|
||||||
|
|
|
|
||||||
9 | pub fn foo2(x: u32) {}
|
11 | pub fn foo2(x: u32) {}
|
||||||
| ^^^^^^
|
| ^^^^^^
|
||||||
|
|
||||||
error: the start function cannot have generics
|
error: the start function cannot have generics
|
||||||
--> $DIR/start-function.rs:12:12
|
--> $DIR/start-function.rs:14:12
|
||||||
|
|
|
|
||||||
12 | pub fn foo3<T>() {}
|
14 | pub fn foo3<T>() {}
|
||||||
| ^^^
|
| ^^^
|
||||||
|
|
||||||
error: aborting due to 2 previous errors
|
error: aborting due to 2 previous errors
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
#![crate_type = "rlib"]
|
||||||
|
|
||||||
extern crate wasm_bindgen;
|
extern crate wasm_bindgen;
|
||||||
|
|
||||||
use wasm_bindgen::prelude::*;
|
use wasm_bindgen::prelude::*;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
error: cannot specify both `structural` and `final`
|
error: cannot specify both `structural` and `final`
|
||||||
--> $DIR/structural-and-final.rs:9:40
|
--> $DIR/structural-and-final.rs:11:40
|
||||||
|
|
|
|
||||||
9 | #[wasm_bindgen(method, structural, final)]
|
11 | #[wasm_bindgen(method, structural, final)]
|
||||||
| ^^^^^
|
| ^^^^^
|
||||||
|
|
||||||
error: aborting due to previous error
|
error: aborting due to previous error
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
#![crate_type = "rlib"]
|
||||||
|
|
||||||
extern crate wasm_bindgen;
|
extern crate wasm_bindgen;
|
||||||
|
|
||||||
use wasm_bindgen::prelude::*;
|
use wasm_bindgen::prelude::*;
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
error: unused #[wasm_bindgen] attribute
|
error: unused #[wasm_bindgen] attribute
|
||||||
--> $DIR/unused-attributes.rs:7:20
|
--> $DIR/unused-attributes.rs:9:20
|
||||||
|
|
|
|
||||||
7 | #[wasm_bindgen(method)]
|
9 | #[wasm_bindgen(method)]
|
||||||
| ^^^^^^
|
| ^^^^^^
|
||||||
|
|
||||||
error: unused #[wasm_bindgen] attribute
|
error: unused #[wasm_bindgen] attribute
|
||||||
--> $DIR/unused-attributes.rs:8:20
|
--> $DIR/unused-attributes.rs:10:20
|
||||||
|
|
|
|
||||||
8 | #[wasm_bindgen(method)]
|
10 | #[wasm_bindgen(method)]
|
||||||
| ^^^^^^
|
| ^^^^^^
|
||||||
|
|
||||||
error: aborting due to 2 previous errors
|
error: aborting due to 2 previous errors
|
||||||
|
Reference in New Issue
Block a user