-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
24 changed files
with
336 additions
and
116 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,61 +1,61 @@ | ||
error: #[wasm_bindgen] default impls are not supported | ||
--> $DIR/invalid-methods.rs:7:1 | ||
--> ui-tests/invalid-methods.rs:7:1 | ||
| | ||
7 | default impl A { | ||
| ^^^^^^^ | ||
|
||
error: #[wasm_bindgen] unsafe impls are not supported | ||
--> $DIR/invalid-methods.rs:11:1 | ||
--> ui-tests/invalid-methods.rs:11:1 | ||
| | ||
11 | unsafe impl A { | ||
| ^^^^^^ | ||
|
||
error: #[wasm_bindgen] trait impls are not supported | ||
--> $DIR/invalid-methods.rs:15:6 | ||
--> ui-tests/invalid-methods.rs:15:6 | ||
| | ||
15 | impl Clone for A { | ||
| ^^^^^ | ||
|
||
error: #[wasm_bindgen] generic impls aren't supported | ||
--> $DIR/invalid-methods.rs:19:5 | ||
--> ui-tests/invalid-methods.rs:19:5 | ||
| | ||
19 | impl<T> A { | ||
| ^^^ | ||
|
||
error: unsupported self type in #[wasm_bindgen] impl | ||
--> $DIR/invalid-methods.rs:23:6 | ||
--> ui-tests/invalid-methods.rs:23:6 | ||
| | ||
23 | impl &'static A { | ||
| ^^^^^^^^^^ | ||
|
||
error: const definitions aren't supported with #[wasm_bindgen] | ||
--> $DIR/invalid-methods.rs:30:5 | ||
--> ui-tests/invalid-methods.rs:30:5 | ||
| | ||
30 | const X: u32 = 3; | ||
| ^^^^^^^^^^^^^^^^^ | ||
|
||
error: type definitions in impls aren't supported with #[wasm_bindgen] | ||
--> $DIR/invalid-methods.rs:31:5 | ||
--> ui-tests/invalid-methods.rs:31:5 | ||
| | ||
31 | type Y = u32; | ||
| ^^^^^^^^^^^^^ | ||
|
||
error: macros in impls aren't supported | ||
--> $DIR/invalid-methods.rs:32:5 | ||
--> ui-tests/invalid-methods.rs:32:5 | ||
| | ||
32 | x!(); | ||
| ^^^^^ | ||
|
||
error: can only #[wasm_bindgen] non-const functions | ||
--> $DIR/invalid-methods.rs:39:9 | ||
--> ui-tests/invalid-methods.rs:39:9 | ||
| | ||
39 | pub const fn foo() {} | ||
| ^^^^^ | ||
|
||
warning: unused macro definition | ||
--> $DIR/invalid-methods.rs:26:1 | ||
warning: unused macro definition: `x` | ||
--> ui-tests/invalid-methods.rs:26:14 | ||
| | ||
26 | macro_rules! x { () => () } | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
| ^ | ||
| | ||
= note: `#[warn(unused_macros)]` on by default |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
use wasm_bindgen::prelude::*; | ||
|
||
#[wasm_bindgen(main)] | ||
async fn main() {} | ||
|
||
#[wasm_bindgen(main)] | ||
fn fail() {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
error: the main function has to be called main | ||
--> ui-tests/main-async.rs:7:4 | ||
| | ||
7 | fn fail() {} | ||
| ^^^^ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
use std::fmt; | ||
use wasm_bindgen::prelude::*; | ||
|
||
#[wasm_bindgen(main)] | ||
fn main() -> Result<(), Test> { | ||
unimplemented!() | ||
} | ||
|
||
struct Test; | ||
|
||
impl fmt::Debug for Test { | ||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { | ||
unimplemented!() | ||
} | ||
} | ||
|
||
#[wasm_bindgen(main)] | ||
fn fail() {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
error: the main function has to be called main | ||
--> ui-tests/main-debug.rs:18:4 | ||
| | ||
18 | fn fail() {} | ||
| ^^^^ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
use std::convert::Infallible; | ||
use wasm_bindgen::prelude::*; | ||
|
||
#[wasm_bindgen(main)] | ||
fn main() -> Infallible { | ||
unimplemented!() | ||
} | ||
|
||
#[wasm_bindgen(main)] | ||
fn fail() {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
error: the main function has to be called main | ||
--> ui-tests/main-infallible.rs:10:4 | ||
| | ||
10 | fn fail() {} | ||
| ^^^^ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
use wasm_bindgen::prelude::*; | ||
|
||
#[wasm_bindgen(main)] | ||
fn main() -> Result<(), JsValue> { | ||
unimplemented!() | ||
} | ||
|
||
#[wasm_bindgen(main)] | ||
fn fail() {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
error: the main function has to be called main | ||
--> ui-tests/main-jsvalue.rs:9:4 | ||
| | ||
9 | fn fail() {} | ||
| ^^^^ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
use std::process; | ||
use wasm_bindgen::prelude::*; | ||
|
||
#[wasm_bindgen(main)] | ||
fn main() -> Result<(), Test> { | ||
unimplemented!() | ||
} | ||
|
||
struct Test; | ||
|
||
impl process::Termination for Test { | ||
fn report(self) -> process::ExitCode { | ||
unimplemented!() | ||
} | ||
} | ||
|
||
#[wasm_bindgen(main)] | ||
fn fail() {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
error: the main function has to be called main | ||
--> ui-tests/main-termination.rs:18:4 | ||
| | ||
18 | fn fail() {} | ||
| ^^^^ | ||
|
||
error[E0599]: the method `__wasm_bindgen_main` exists for mutable reference `&mut MainWrapper<Result<(), Test>>`, but its trait bounds were not satisfied | ||
--> ui-tests/main-termination.rs:4:1 | ||
| | ||
4 | #[wasm_bindgen(main)] | ||
| ^^^^^^^^^^^^^^^^^^^^^ method cannot be called on `&mut MainWrapper<Result<(), Test>>` due to unsatisfied trait bounds | ||
... | ||
9 | struct Test; | ||
| ------------ | ||
| | | ||
| doesn't satisfy `Test: Debug` | ||
| doesn't satisfy `Test: Into<JsValue>` | ||
| | ||
::: $WORKSPACE/src/lib.rs | ||
| | ||
| pub struct MainWrapper<T>(pub Option<T>); | ||
| ----------------------------------------- doesn't satisfy `MainWrapper<Result<(), Test>>: Main` | ||
| | ||
= note: the following trait bounds were not satisfied: | ||
`Test: Debug` | ||
which is required by `&mut MainWrapper<Result<(), Test>>: Main` | ||
`Result<(), Test>: Termination` | ||
which is required by `&mut &mut MainWrapper<Result<(), Test>>: Main` | ||
`Test: Into<JsValue>` | ||
which is required by `MainWrapper<Result<(), Test>>: Main` | ||
note: the following trait must be implemented | ||
= note: this error originates in the attribute macro `wasm_bindgen` (in Nightly builds, run with -Z macro-backtrace for more info) | ||
help: consider annotating `Test` with `#[derive(Debug)]` | ||
| | ||
9 | #[derive(Debug)] | ||
| |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
use wasm_bindgen::prelude::*; | ||
|
||
#[wasm_bindgen(main)] | ||
fn main() -> () {} | ||
|
||
#[wasm_bindgen(main)] | ||
fn fail() {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
error: the main function has to be called main | ||
--> ui-tests/main-unit.rs:7:4 | ||
| | ||
7 | fn fail() {} | ||
| ^^^^ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
use wasm_bindgen::prelude::*; | ||
|
||
#[wasm_bindgen(main)] | ||
fn main() {} | ||
|
||
#[wasm_bindgen(main)] | ||
fn fail() {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
error: the main function has to be called main | ||
--> ui-tests/main.rs:7:4 | ||
| | ||
7 | fn fail() {} | ||
| ^^^^ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.