Skip to content

Commit

Permalink
Try to fix CI (#3414)
Browse files Browse the repository at this point in the history
* Update UI errors to current stable Rust

* Update nightlies used in CI
  • Loading branch information
alexcrichton committed May 8, 2023
1 parent c600fbe commit 5621603
Show file tree
Hide file tree
Showing 9 changed files with 68 additions and 34 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: rustup default nightly-2022-05-19
- run: rustup default nightly-2023-05-08
- run: rustup target add wasm32-unknown-unknown
- run: rustup component add rust-src
# Note: we only run the browser tests here, because wasm-bindgen doesn't support threading in Node yet.
Expand Down Expand Up @@ -221,7 +221,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: rustup update --no-self-update 1.60.0 && rustup default 1.60.0
- run: rustup update --no-self-update 1.69.0 && rustup default 1.69.0
- run: cargo test -p wasm-bindgen-macro
- run: cargo test -p wasm-bindgen-test-macro

Expand Down Expand Up @@ -258,7 +258,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: rustup default nightly-2022-05-19
- run: rustup default nightly-2023-05-08
- run: rustup target add wasm32-unknown-unknown
- run: rustup component add rust-src
- run: |
Expand Down
30 changes: 17 additions & 13 deletions crates/macro/ui-tests/async-errors.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ error[E0277]: the trait bound `Result<(), ()>: IntoJsResult` is not satisfied
30 | #[wasm_bindgen]
| ^^^^^^^^^^^^^^^ the trait `IntoJsResult` is not implemented for `Result<(), ()>`
|
= help: the following implementations were found:
<Result<(), E> as IntoJsResult>
<Result<T, E> as IntoJsResult>
= help: the following other types implement trait `IntoJsResult`:
Result<(), E>
Result<T, E>
= note: this error originates in the attribute macro `wasm_bindgen` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0277]: the trait bound `Result<(), BadType>: IntoJsResult` is not satisfied
Expand All @@ -15,9 +15,9 @@ error[E0277]: the trait bound `Result<(), BadType>: IntoJsResult` is not satisfi
32 | #[wasm_bindgen]
| ^^^^^^^^^^^^^^^ the trait `IntoJsResult` is not implemented for `Result<(), BadType>`
|
= help: the following implementations were found:
<Result<(), E> as IntoJsResult>
<Result<T, E> as IntoJsResult>
= help: the following other types implement trait `IntoJsResult`:
Result<(), E>
Result<T, E>
= note: this error originates in the attribute macro `wasm_bindgen` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0277]: the trait bound `wasm_bindgen::JsValue: From<BadType>` is not satisfied
Expand All @@ -26,14 +26,18 @@ error[E0277]: the trait bound `wasm_bindgen::JsValue: From<BadType>` is not sati
34 | #[wasm_bindgen]
| ^^^^^^^^^^^^^^^ the trait `From<BadType>` is not implemented for `wasm_bindgen::JsValue`
|
= help: the following implementations were found:
= help: the following other types implement trait `From<T>`:
<wasm_bindgen::JsValue as From<&'a String>>
<wasm_bindgen::JsValue as From<&'a T>>
<wasm_bindgen::JsValue as From<&'a str>>
<wasm_bindgen::JsValue as From<*const T>>
and $N others
= note: required because of the requirements on the impl of `Into<wasm_bindgen::JsValue>` for `BadType`
= note: required because of the requirements on the impl of `IntoJsResult` for `BadType`
<wasm_bindgen::JsValue as From<*mut T>>
<wasm_bindgen::JsValue as From<JsError>>
<wasm_bindgen::JsValue as From<MyType>>
<wasm_bindgen::JsValue as From<Option<T>>>
and 72 others
= note: required for `BadType` to implement `Into<wasm_bindgen::JsValue>`
= note: required for `BadType` to implement `IntoJsResult`
= note: this error originates in the attribute macro `wasm_bindgen` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0277]: the trait bound `Result<BadType, wasm_bindgen::JsValue>: IntoJsResult` is not satisfied
Expand All @@ -42,7 +46,7 @@ error[E0277]: the trait bound `Result<BadType, wasm_bindgen::JsValue>: IntoJsRes
36 | #[wasm_bindgen]
| ^^^^^^^^^^^^^^^ the trait `IntoJsResult` is not implemented for `Result<BadType, wasm_bindgen::JsValue>`
|
= help: the following implementations were found:
<Result<(), E> as IntoJsResult>
<Result<T, E> as IntoJsResult>
= help: the following other types implement trait `IntoJsResult`:
Result<(), E>
Result<T, E>
= note: this error originates in the attribute macro `wasm_bindgen` (in Nightly builds, run with -Z macro-backtrace for more info)
4 changes: 2 additions & 2 deletions crates/macro/ui-tests/invalid-imports.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ error: first argument of method must be a shared reference
| ^^^

error: first argument of method must be a path
--> ui-tests/invalid-imports.rs:14:14
--> ui-tests/invalid-imports.rs:14:15
|
14 | fn f3(x: &&u32);
| ^^^^^
| ^^^^

error: paths with type parameters are not supported yet
--> ui-tests/invalid-imports.rs:20:15
Expand Down
11 changes: 11 additions & 0 deletions crates/macro/ui-tests/missing-catch.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,14 @@ error[E0277]: the trait bound `Result<wasm_bindgen::JsValue, wasm_bindgen::JsVal
|
6 | pub fn foo() -> Result<JsValue, JsValue>;
| ^^^ the trait `FromWasmAbi` is not implemented for `Result<wasm_bindgen::JsValue, wasm_bindgen::JsValue>`
|
= help: the following other types implement trait `FromWasmAbi`:
*const T
*mut T
Box<[T]>
Box<[f32]>
Box<[f64]>
Box<[i16]>
Box<[i32]>
Box<[i64]>
and 35 others
12 changes: 4 additions & 8 deletions crates/macro/ui-tests/start-function.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ error[E0277]: the trait bound `Result<wasm_bindgen::JsValue, ()>: wasm_bindgen::
15 | #[wasm_bindgen(start)]
| ^^^^^^^^^^^^^^^^^^^^^^ the trait `wasm_bindgen::__rt::Start` is not implemented for `Result<wasm_bindgen::JsValue, ()>`
|
= help: the following implementations were found:
<Result<(), E> as wasm_bindgen::__rt::Start>
= help: the trait `wasm_bindgen::__rt::Start` is implemented for `Result<(), E>`
= note: this error originates in the attribute macro `wasm_bindgen` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0277]: the trait bound `Result<wasm_bindgen::JsValue, wasm_bindgen::JsValue>: wasm_bindgen::__rt::Start` is not satisfied
Expand All @@ -26,8 +25,7 @@ error[E0277]: the trait bound `Result<wasm_bindgen::JsValue, wasm_bindgen::JsVal
18 | #[wasm_bindgen(start)]
| ^^^^^^^^^^^^^^^^^^^^^^ the trait `wasm_bindgen::__rt::Start` is not implemented for `Result<wasm_bindgen::JsValue, wasm_bindgen::JsValue>`
|
= help: the following implementations were found:
<Result<(), E> as wasm_bindgen::__rt::Start>
= help: the trait `wasm_bindgen::__rt::Start` is implemented for `Result<(), E>`
= note: this error originates in the attribute macro `wasm_bindgen` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0277]: the trait bound `Result<wasm_bindgen::JsValue, ()>: wasm_bindgen::__rt::Start` is not satisfied
Expand All @@ -36,8 +34,7 @@ error[E0277]: the trait bound `Result<wasm_bindgen::JsValue, ()>: wasm_bindgen::
27 | #[wasm_bindgen(start)]
| ^^^^^^^^^^^^^^^^^^^^^^ the trait `wasm_bindgen::__rt::Start` is not implemented for `Result<wasm_bindgen::JsValue, ()>`
|
= help: the following implementations were found:
<Result<(), E> as wasm_bindgen::__rt::Start>
= help: the trait `wasm_bindgen::__rt::Start` is implemented for `Result<(), E>`
= note: this error originates in the attribute macro `wasm_bindgen` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0277]: the trait bound `Result<wasm_bindgen::JsValue, wasm_bindgen::JsValue>: wasm_bindgen::__rt::Start` is not satisfied
Expand All @@ -46,6 +43,5 @@ error[E0277]: the trait bound `Result<wasm_bindgen::JsValue, wasm_bindgen::JsVal
30 | #[wasm_bindgen(start)]
| ^^^^^^^^^^^^^^^^^^^^^^ the trait `wasm_bindgen::__rt::Start` is not implemented for `Result<wasm_bindgen::JsValue, wasm_bindgen::JsValue>`
|
= help: the following implementations were found:
<Result<(), E> as wasm_bindgen::__rt::Start>
= help: the trait `wasm_bindgen::__rt::Start` is implemented for `Result<(), E>`
= note: this error originates in the attribute macro `wasm_bindgen` (in Nightly builds, run with -Z macro-backtrace for more info)
16 changes: 13 additions & 3 deletions crates/macro/ui-tests/struct-fields.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,21 @@ note: required by a bound in `__wbg_get_bar_a::assert_copy`
--> ui-tests/struct-fields.rs:8:1
|
8 | #[wasm_bindgen]
| ^^^^^^^^^^^^^^^ required by this bound in `__wbg_get_bar_a::assert_copy`
| ^^^^^^^^^^^^^^^ required by this bound in `assert_copy`
= note: this error originates in the attribute macro `wasm_bindgen` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0277]: the trait bound `Foo: Clone` is not satisfied
--> ui-tests/struct-fields.rs:11:20
|
11 | #[wasm_bindgen(getter_with_clone)]
| ^^^^^^^^^^^^^^^^^ the trait `Clone` is not implemented for `Foo`
11 | #[wasm_bindgen(getter_with_clone)]
| ^----------------
| |
| ____________________required by a bound introduced by this call
| |
12 | | pub b: Foo,
| |_________^ the trait `Clone` is not implemented for `Foo`
|
help: consider annotating `Foo` with `#[derive(Clone)]`
|
3 | #[derive(Clone)]
|
10 changes: 10 additions & 0 deletions crates/macro/ui-tests/traits-not-implemented.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,14 @@ error[E0277]: the trait bound `A: IntoWasmAbi` is not satisfied
5 | #[wasm_bindgen]
| ^^^^^^^^^^^^^^^ the trait `IntoWasmAbi` is not implemented for `A`
|
= help: the following other types implement trait `IntoWasmAbi`:
&'a (dyn Fn() -> R + 'b)
&'a (dyn Fn(A) -> R + 'b)
&'a (dyn Fn(A, B) -> R + 'b)
&'a (dyn Fn(A, B, C) -> R + 'b)
&'a (dyn Fn(A, B, C, D) -> R + 'b)
&'a (dyn Fn(A, B, C, D, E) -> R + 'b)
&'a (dyn Fn(A, B, C, D, E, F) -> R + 'b)
&'a (dyn Fn(A, B, C, D, E, F, G) -> R + 'b)
and 84 others
= note: this error originates in the attribute macro `wasm_bindgen` (in Nightly builds, run with -Z macro-backtrace for more info)
11 changes: 7 additions & 4 deletions crates/macro/ui-tests/unknown-type-in-import.stderr
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
error[E0412]: cannot find type `A` in this scope
--> $DIR/unknown-type-in-import.rs:6:19
--> ui-tests/unknown-type-in-import.rs:6:19
|
6 | pub fn foo(a: A);
| - ^ not found in this scope
| |
| help: you might be missing a type parameter: `<A>`
| ^ not found in this scope
|
help: you might be missing a type parameter
|
6 | pub fn foo<A>(a: A);
| +++
2 changes: 1 addition & 1 deletion crates/test-macro/ui-tests/should_panic.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ error: malformed `#[should_panic = "..."]` attribute
--> ui-tests/should_panic.rs:28:15
|
28 | #[should_panic::error]
| ^^
| ^

error: malformed `#[should_panic]` attribute
--> ui-tests/should_panic.rs:32:18
Expand Down

0 comments on commit 5621603

Please sign in to comment.