Skip to content

Commit

Permalink
CI fix for Rust 1.75 (rustwasm#3761)
Browse files Browse the repository at this point in the history
* fix wat output file

* cargo clippy --no-deps --all-features -p wasm-bindgen-macro-support --fix -- -D warnings

* add #[allow(unused_imports)] for the binding file in web-sys
  • Loading branch information
thomasetter authored Dec 31, 2023
1 parent c0ee195 commit a3332e4
Show file tree
Hide file tree
Showing 4 changed files with 1,593 additions and 5 deletions.
4 changes: 2 additions & 2 deletions crates/cli/tests/reference/anyref-import-catch.wat
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
(type (;3;) (func (param i32) (result i32)))
(import "./reference_test_bg.js" "__wbindgen_init_externref_table" (func (;0;) (type 0)))
(func $__wbindgen_exn_store (;1;) (type 2) (param i32))
(func $exported (;2;) (type 2) (param i32))
(func $__externref_table_dealloc (;3;) (type 2) (param i32))
(func $__externref_table_dealloc (;2;) (type 2) (param i32))
(func $exported (;3;) (type 2) (param i32))
(func $__externref_table_alloc (;4;) (type 1) (result i32))
(func $__wbindgen_add_to_stack_pointer (;5;) (type 3) (param i32) (result i32))
(table (;0;) 128 externref)
Expand Down
2 changes: 1 addition & 1 deletion crates/macro-support/src/parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -525,7 +525,7 @@ impl<'a> ConvertToAst<(&ast::Program, BindgenAttrs, &'a Option<ast::ImportModule
let operation_kind = operation_kind(&opts);

let kind = if opts.method().is_some() {
let class = wasm.arguments.get(0).ok_or_else(|| {
let class = wasm.arguments.first().ok_or_else(|| {
err_span!(self, "imported methods must have at least one argument")
})?;
let class = match get_ty(&class.ty) {
Expand Down
Loading

0 comments on commit a3332e4

Please sign in to comment.