Skip to content

Commit 7c00de9

Browse files
authored
Update UI tests (#2678)
1 parent 123d5f5 commit 7c00de9

File tree

4 files changed

+132
-88
lines changed

4 files changed

+132
-88
lines changed
Lines changed: 61 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,68 @@
11
error[E0277]: the trait bound `Result<(), ()>: IntoJsResult` is not satisfied
2-
--> $DIR/async-errors.rs:30:1
3-
|
4-
30 | #[wasm_bindgen]
5-
| ^^^^^^^^^^^^^^^ the trait `IntoJsResult` is not implemented for `Result<(), ()>`
6-
|
7-
= help: the following implementations were found:
8-
<Result<(), E> as IntoJsResult>
9-
<Result<T, E> as IntoJsResult>
10-
= note: required by `into_js_result`
11-
= note: this error originates in the attribute macro `wasm_bindgen` (in Nightly builds, run with -Z macro-backtrace for more info)
2+
--> $DIR/async-errors.rs:30:1
3+
|
4+
30 | #[wasm_bindgen]
5+
| ^^^^^^^^^^^^^^^ the trait `IntoJsResult` is not implemented for `Result<(), ()>`
6+
|
7+
= help: the following implementations were found:
8+
<Result<(), E> as IntoJsResult>
9+
<Result<T, E> as IntoJsResult>
10+
note: required by `into_js_result`
11+
--> $DIR/lib.rs:1512:9
12+
|
13+
1512 | fn into_js_result(self) -> Result<JsValue, JsValue>;
14+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
15+
= note: this error originates in the attribute macro `wasm_bindgen` (in Nightly builds, run with -Z macro-backtrace for more info)
1216

1317
error[E0277]: the trait bound `Result<(), BadType>: IntoJsResult` is not satisfied
14-
--> $DIR/async-errors.rs:32:1
15-
|
16-
32 | #[wasm_bindgen]
17-
| ^^^^^^^^^^^^^^^ the trait `IntoJsResult` is not implemented for `Result<(), BadType>`
18-
|
19-
= help: the following implementations were found:
20-
<Result<(), E> as IntoJsResult>
21-
<Result<T, E> as IntoJsResult>
22-
= note: required by `into_js_result`
23-
= note: this error originates in the attribute macro `wasm_bindgen` (in Nightly builds, run with -Z macro-backtrace for more info)
18+
--> $DIR/async-errors.rs:32:1
19+
|
20+
32 | #[wasm_bindgen]
21+
| ^^^^^^^^^^^^^^^ the trait `IntoJsResult` is not implemented for `Result<(), BadType>`
22+
|
23+
= help: the following implementations were found:
24+
<Result<(), E> as IntoJsResult>
25+
<Result<T, E> as IntoJsResult>
26+
note: required by `into_js_result`
27+
--> $DIR/lib.rs:1512:9
28+
|
29+
1512 | fn into_js_result(self) -> Result<JsValue, JsValue>;
30+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
31+
= note: this error originates in the attribute macro `wasm_bindgen` (in Nightly builds, run with -Z macro-backtrace for more info)
2432

2533
error[E0277]: the trait bound `wasm_bindgen::JsValue: From<BadType>` is not satisfied
26-
--> $DIR/async-errors.rs:34:1
27-
|
28-
34 | #[wasm_bindgen]
29-
| ^^^^^^^^^^^^^^^ the trait `From<BadType>` is not implemented for `wasm_bindgen::JsValue`
30-
|
31-
= help: the following implementations were found:
32-
<wasm_bindgen::JsValue as From<&'a String>>
33-
<wasm_bindgen::JsValue as From<&'a T>>
34-
<wasm_bindgen::JsValue as From<&'a str>>
35-
<wasm_bindgen::JsValue as From<MyType>>
36-
and 72 others
37-
= note: required because of the requirements on the impl of `Into<wasm_bindgen::JsValue>` for `BadType`
38-
= note: required because of the requirements on the impl of `IntoJsResult` for `BadType`
39-
= note: required by `into_js_result`
40-
= note: this error originates in the attribute macro `wasm_bindgen` (in Nightly builds, run with -Z macro-backtrace for more info)
34+
--> $DIR/async-errors.rs:34:1
35+
|
36+
34 | #[wasm_bindgen]
37+
| ^^^^^^^^^^^^^^^ the trait `From<BadType>` is not implemented for `wasm_bindgen::JsValue`
38+
|
39+
= help: the following implementations were found:
40+
<wasm_bindgen::JsValue as From<&'a String>>
41+
<wasm_bindgen::JsValue as From<&'a T>>
42+
<wasm_bindgen::JsValue as From<&'a str>>
43+
<wasm_bindgen::JsValue as From<MyType>>
44+
and 72 others
45+
= note: required because of the requirements on the impl of `Into<wasm_bindgen::JsValue>` for `BadType`
46+
= note: required because of the requirements on the impl of `IntoJsResult` for `BadType`
47+
note: required by `into_js_result`
48+
--> $DIR/lib.rs:1512:9
49+
|
50+
1512 | fn into_js_result(self) -> Result<JsValue, JsValue>;
51+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
52+
= note: this error originates in the attribute macro `wasm_bindgen` (in Nightly builds, run with -Z macro-backtrace for more info)
4153

4254
error[E0277]: the trait bound `Result<BadType, wasm_bindgen::JsValue>: IntoJsResult` is not satisfied
43-
--> $DIR/async-errors.rs:36:1
44-
|
45-
36 | #[wasm_bindgen]
46-
| ^^^^^^^^^^^^^^^ the trait `IntoJsResult` is not implemented for `Result<BadType, wasm_bindgen::JsValue>`
47-
|
48-
= help: the following implementations were found:
49-
<Result<(), E> as IntoJsResult>
50-
<Result<T, E> as IntoJsResult>
51-
= note: required by `into_js_result`
52-
= note: this error originates in the attribute macro `wasm_bindgen` (in Nightly builds, run with -Z macro-backtrace for more info)
55+
--> $DIR/async-errors.rs:36:1
56+
|
57+
36 | #[wasm_bindgen]
58+
| ^^^^^^^^^^^^^^^ the trait `IntoJsResult` is not implemented for `Result<BadType, wasm_bindgen::JsValue>`
59+
|
60+
= help: the following implementations were found:
61+
<Result<(), E> as IntoJsResult>
62+
<Result<T, E> as IntoJsResult>
63+
note: required by `into_js_result`
64+
--> $DIR/lib.rs:1512:9
65+
|
66+
1512 | fn into_js_result(self) -> Result<JsValue, JsValue>;
67+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
68+
= note: this error originates in the attribute macro `wasm_bindgen` (in Nightly builds, run with -Z macro-backtrace for more info)
Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
error[E0277]: the trait bound `Result<wasm_bindgen::JsValue, wasm_bindgen::JsValue>: FromWasmAbi` is not satisfied
2-
--> $DIR/missing-catch.rs:6:9
3-
|
4-
6 | pub fn foo() -> Result<JsValue, JsValue>;
5-
| ^^^ the trait `FromWasmAbi` is not implemented for `Result<wasm_bindgen::JsValue, wasm_bindgen::JsValue>`
2+
--> $DIR/missing-catch.rs:6:9
3+
|
4+
6 | pub fn foo() -> Result<JsValue, JsValue>;
5+
| ^^^ the trait `FromWasmAbi` is not implemented for `Result<wasm_bindgen::JsValue, wasm_bindgen::JsValue>`
6+
|
7+
::: $WORKSPACE/src/convert/traits.rs
8+
|
9+
| pub trait FromWasmAbi: WasmDescribe {
10+
| ----------------------------------- required by this bound in `FromWasmAbi`

crates/macro/ui-tests/start-function.stderr

Lines changed: 52 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -11,45 +11,61 @@ error: the start function cannot have generics
1111
| ^^^
1212

1313
error[E0277]: the trait bound `Result<wasm_bindgen::JsValue, ()>: wasm_bindgen::__rt::Start` is not satisfied
14-
--> $DIR/start-function.rs:15:1
15-
|
16-
15 | #[wasm_bindgen(start)]
17-
| ^^^^^^^^^^^^^^^^^^^^^^ the trait `wasm_bindgen::__rt::Start` is not implemented for `Result<wasm_bindgen::JsValue, ()>`
18-
|
19-
= help: the following implementations were found:
20-
<Result<(), E> as wasm_bindgen::__rt::Start>
21-
= note: required by `start`
22-
= note: this error originates in the attribute macro `wasm_bindgen` (in Nightly builds, run with -Z macro-backtrace for more info)
14+
--> $DIR/start-function.rs:15:1
15+
|
16+
15 | #[wasm_bindgen(start)]
17+
| ^^^^^^^^^^^^^^^^^^^^^^ the trait `wasm_bindgen::__rt::Start` is not implemented for `Result<wasm_bindgen::JsValue, ()>`
18+
|
19+
= help: the following implementations were found:
20+
<Result<(), E> as wasm_bindgen::__rt::Start>
21+
note: required by `start`
22+
--> $DIR/lib.rs:1548:9
23+
|
24+
1548 | fn start(self);
25+
| ^^^^^^^^^^^^^^^
26+
= note: this error originates in the attribute macro `wasm_bindgen` (in Nightly builds, run with -Z macro-backtrace for more info)
2327

2428
error[E0277]: the trait bound `Result<wasm_bindgen::JsValue, wasm_bindgen::JsValue>: wasm_bindgen::__rt::Start` is not satisfied
25-
--> $DIR/start-function.rs:18:1
26-
|
27-
18 | #[wasm_bindgen(start)]
28-
| ^^^^^^^^^^^^^^^^^^^^^^ the trait `wasm_bindgen::__rt::Start` is not implemented for `Result<wasm_bindgen::JsValue, wasm_bindgen::JsValue>`
29-
|
30-
= help: the following implementations were found:
31-
<Result<(), E> as wasm_bindgen::__rt::Start>
32-
= note: required by `start`
33-
= note: this error originates in the attribute macro `wasm_bindgen` (in Nightly builds, run with -Z macro-backtrace for more info)
29+
--> $DIR/start-function.rs:18:1
30+
|
31+
18 | #[wasm_bindgen(start)]
32+
| ^^^^^^^^^^^^^^^^^^^^^^ the trait `wasm_bindgen::__rt::Start` is not implemented for `Result<wasm_bindgen::JsValue, wasm_bindgen::JsValue>`
33+
|
34+
= help: the following implementations were found:
35+
<Result<(), E> as wasm_bindgen::__rt::Start>
36+
note: required by `start`
37+
--> $DIR/lib.rs:1548:9
38+
|
39+
1548 | fn start(self);
40+
| ^^^^^^^^^^^^^^^
41+
= note: this error originates in the attribute macro `wasm_bindgen` (in Nightly builds, run with -Z macro-backtrace for more info)
3442

3543
error[E0277]: the trait bound `Result<wasm_bindgen::JsValue, ()>: wasm_bindgen::__rt::Start` is not satisfied
36-
--> $DIR/start-function.rs:27:1
37-
|
38-
27 | #[wasm_bindgen(start)]
39-
| ^^^^^^^^^^^^^^^^^^^^^^ the trait `wasm_bindgen::__rt::Start` is not implemented for `Result<wasm_bindgen::JsValue, ()>`
40-
|
41-
= help: the following implementations were found:
42-
<Result<(), E> as wasm_bindgen::__rt::Start>
43-
= note: required by `start`
44-
= note: this error originates in the attribute macro `wasm_bindgen` (in Nightly builds, run with -Z macro-backtrace for more info)
44+
--> $DIR/start-function.rs:27:1
45+
|
46+
27 | #[wasm_bindgen(start)]
47+
| ^^^^^^^^^^^^^^^^^^^^^^ the trait `wasm_bindgen::__rt::Start` is not implemented for `Result<wasm_bindgen::JsValue, ()>`
48+
|
49+
= help: the following implementations were found:
50+
<Result<(), E> as wasm_bindgen::__rt::Start>
51+
note: required by `start`
52+
--> $DIR/lib.rs:1548:9
53+
|
54+
1548 | fn start(self);
55+
| ^^^^^^^^^^^^^^^
56+
= note: this error originates in the attribute macro `wasm_bindgen` (in Nightly builds, run with -Z macro-backtrace for more info)
4557

4658
error[E0277]: the trait bound `Result<wasm_bindgen::JsValue, wasm_bindgen::JsValue>: wasm_bindgen::__rt::Start` is not satisfied
47-
--> $DIR/start-function.rs:30:1
48-
|
49-
30 | #[wasm_bindgen(start)]
50-
| ^^^^^^^^^^^^^^^^^^^^^^ the trait `wasm_bindgen::__rt::Start` is not implemented for `Result<wasm_bindgen::JsValue, wasm_bindgen::JsValue>`
51-
|
52-
= help: the following implementations were found:
53-
<Result<(), E> as wasm_bindgen::__rt::Start>
54-
= note: required by `start`
55-
= note: this error originates in the attribute macro `wasm_bindgen` (in Nightly builds, run with -Z macro-backtrace for more info)
59+
--> $DIR/start-function.rs:30:1
60+
|
61+
30 | #[wasm_bindgen(start)]
62+
| ^^^^^^^^^^^^^^^^^^^^^^ the trait `wasm_bindgen::__rt::Start` is not implemented for `Result<wasm_bindgen::JsValue, wasm_bindgen::JsValue>`
63+
|
64+
= help: the following implementations were found:
65+
<Result<(), E> as wasm_bindgen::__rt::Start>
66+
note: required by `start`
67+
--> $DIR/lib.rs:1548:9
68+
|
69+
1548 | fn start(self);
70+
| ^^^^^^^^^^^^^^^
71+
= note: this error originates in the attribute macro `wasm_bindgen` (in Nightly builds, run with -Z macro-backtrace for more info)
Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
error[E0277]: the trait bound `A: IntoWasmAbi` is not satisfied
2-
--> $DIR/traits-not-implemented.rs:8:12
2+
--> $DIR/traits-not-implemented.rs:5:1
33
|
4-
8 | pub fn foo(a: A);
5-
| ^^^ the trait `IntoWasmAbi` is not implemented for `A`
4+
5 | #[wasm_bindgen]
5+
| ^^^^^^^^^^^^^^^ the trait `IntoWasmAbi` is not implemented for `A`
6+
|
7+
::: $WORKSPACE/src/convert/traits.rs
8+
|
9+
| pub trait IntoWasmAbi: WasmDescribe {
10+
| ----------------------------------- required by this bound in `IntoWasmAbi`
11+
|
12+
= note: this error originates in the attribute macro `wasm_bindgen` (in Nightly builds, run with -Z macro-backtrace for more info)

0 commit comments

Comments
 (0)