Skip to content

Fix CI failures introduced by Rust 1.78 (except clippy::empty_docs) #3949

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .cargo/config → .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# TODO: we shouldn't check this in to git, need to figure out how to avoid doing
# that.
[target.wasm32-unknown-unknown]
runner = 'cargo run -p wasm-bindgen-cli --bin wasm-bindgen-test-runner --'

Expand Down
1 change: 1 addition & 0 deletions benchmarks/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
name = "wasm-bindgen-benchmark"
version = "0.1.0"
authors = ["The wasm-bindgen Developers"]
edition = "2018"
rust-version = "1.57"

[dependencies]
Expand Down
9 changes: 5 additions & 4 deletions crates/cli-support/src/js/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2797,15 +2797,15 @@ impl<'a> Context<'a> {
match &js.name {
JsImportName::Module { module, name } => {
let import = self.module.imports.get_mut(id);
import.module = module.clone();
import.name = name.clone();
import.module.clone_from(module);
import.name.clone_from(name);
return Ok(true);
}
JsImportName::LocalModule { module, name } => {
let module = self.config.local_module_name(module);
let import = self.module.imports.get_mut(id);
import.module = module;
import.name = name.clone();
import.name.clone_from(name);
return Ok(true);
}
JsImportName::InlineJs {
Expand All @@ -2818,7 +2818,7 @@ impl<'a> Context<'a> {
.inline_js_module_name(unique_crate_identifier, *snippet_idx_in_crate);
let import = self.module.imports.get_mut(id);
import.module = module;
import.name = name.clone();
import.name.clone_from(name);
return Ok(true);
}

Expand Down Expand Up @@ -4133,6 +4133,7 @@ impl ExportedClass {
}
}

#[allow(clippy::assigning_clones)] // Clippy's suggested fix doesn't work at MSRV.
fn push_accessor_ts(
&mut self,
docs: &str,
Expand Down
2 changes: 1 addition & 1 deletion crates/cli/tests/reference/add.wat
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(module
(module $reference_test.wasm
(type (;0;) (func (param i32 i32) (result i32)))
(func $add_u32 (;0;) (type 0) (param i32 i32) (result i32))
(func $add_i32 (;1;) (type 0) (param i32 i32) (result i32))
Expand Down
2 changes: 1 addition & 1 deletion crates/cli/tests/reference/anyref-empty.wat
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(module
(module $reference_test.wasm
(type (;0;) (func))
(import "./reference_test_bg.js" "__wbindgen_init_externref_table" (func (;0;) (type 0)))
(table (;0;) 128 externref)
Expand Down
2 changes: 1 addition & 1 deletion crates/cli/tests/reference/anyref-import-catch.wat
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(module
(module $reference_test.wasm
(type (;0;) (func))
(type (;1;) (func (result i32)))
(type (;2;) (func (param i32)))
Expand Down
2 changes: 1 addition & 1 deletion crates/cli/tests/reference/anyref-nop.wat
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(module
(module $reference_test.wasm
(type (;0;) (func))
(import "./reference_test_bg.js" "__wbindgen_init_externref_table" (func (;0;) (type 0)))
(func $foo (;1;) (type 0))
Expand Down
2 changes: 1 addition & 1 deletion crates/cli/tests/reference/builder.wat
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(module
(module $reference_test.wasm
(type (;0;) (func (result i32)))
(type (;1;) (func (param i32)))
(func $classbuilder_builder (;0;) (type 0) (result i32))
Expand Down
2 changes: 1 addition & 1 deletion crates/cli/tests/reference/constructor.wat
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(module
(module $reference_test.wasm
(type (;0;) (func (result i32)))
(type (;1;) (func (param i32)))
(func $classconstructor_new (;0;) (type 0) (result i32))
Expand Down
2 changes: 1 addition & 1 deletion crates/cli/tests/reference/empty.wat
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(module
(module $reference_test.wasm
(memory (;0;) 16)
(export "memory" (memory 0))
)
2 changes: 1 addition & 1 deletion crates/cli/tests/reference/enums.wat
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(module
(module $reference_test.wasm
(type (;0;) (func (param i32) (result i32)))
(func $enum_echo (;0;) (type 0) (param i32) (result i32))
(func $option_enum_echo (;1;) (type 0) (param i32) (result i32))
Expand Down
2 changes: 1 addition & 1 deletion crates/cli/tests/reference/import-catch.wat
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(module
(module $reference_test.wasm
(type (;0;) (func (param i32)))
(type (;1;) (func (param i32) (result i32)))
(func $exported (;0;) (type 0) (param i32))
Expand Down
2 changes: 1 addition & 1 deletion crates/cli/tests/reference/nop.wat
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(module
(module $reference_test.wasm
(type (;0;) (func))
(func $nop (;0;) (type 0))
(memory (;0;) 17)
Expand Down
2 changes: 1 addition & 1 deletion crates/cli/tests/reference/pointers.wat
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(module
(module $reference_test.wasm
(type (;0;) (func (param i32) (result i32)))
(func $const_pointer (;0;) (type 0) (param i32) (result i32))
(func $mut_pointer (;1;) (type 0) (param i32) (result i32))
Expand Down
2 changes: 1 addition & 1 deletion crates/cli/tests/reference/result-string.wat
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(module
(module $reference_test.wasm
(type (;0;) (func (param i32)))
(type (;1;) (func (param i32) (result i32)))
(type (;2;) (func (param i32 i32 i32)))
Expand Down
2 changes: 1 addition & 1 deletion crates/cli/tests/reference/skip-jsdoc.wat
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(module
(module $reference_test.wasm
(type (;0;) (func (param i32) (result i32)))
(func $docme (;0;) (type 0) (param i32) (result i32))
(memory (;0;) 17)
Expand Down
2 changes: 1 addition & 1 deletion crates/cli/tests/reference/string-arg.wat
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(module
(module $reference_test.wasm
(type (;0;) (func (param i32 i32)))
(type (;1;) (func (param i32 i32) (result i32)))
(type (;2;) (func (param i32 i32 i32 i32) (result i32)))
Expand Down
1 change: 1 addition & 0 deletions tests/wasm/slice.rs
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,7 @@ impl ReturnVecApplication {
ReturnVecApplication { thing }
}

#[allow(clippy::assigning_clones)] // false positive, should be fixed by https://github.com/rust-lang/rust-clippy/pull/12756
pub fn tick(&mut self) {
self.thing = self.thing.clone();
}
Expand Down