Skip to content

Commit

Permalink
Fix MSRV compilation (#3927)
Browse files Browse the repository at this point in the history
  • Loading branch information
daxpedda committed Apr 18, 2024
1 parent 7d0b11c commit 134fdda
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@
* Fix `catch` not being thread-safe.
[#3879](https://github.com/rustwasm/wasm-bindgen/pull/3879)

* Fix MSRV compilation.
[#3927](https://github.com/rustwasm/wasm-bindgen/pull/3927)

--------------------------------------------------------------------------------

## [0.2.92](https://github.com/rustwasm/wasm-bindgen/compare/0.2.91...0.2.92)
Expand Down
6 changes: 3 additions & 3 deletions crates/backend/src/codegen.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1716,9 +1716,9 @@ fn splat(
let mut args = Vec::new();
let mut names = Vec::new();

for n in 1..=4 {
let arg_name = format_ident!("{name}_{n}");
let prim_name = format_ident!("Prim{n}");
for n in 1_u32..=4 {
let arg_name = format_ident!("{}_{}", name, n);
let prim_name = format_ident!("Prim{}", n);
args.push(quote! {
#arg_name: <#abi as #wasm_bindgen::convert::WasmAbi>::#prim_name
});
Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1820,7 +1820,7 @@ pub mod __rt {
}
}

pub const fn flat_len<const SIZE: usize, T>(slices: [&[T]; SIZE]) -> usize {
pub const fn flat_len<T, const SIZE: usize>(slices: [&[T]; SIZE]) -> usize {
let mut len = 0;
let mut i = 0;
while i < slices.len() {
Expand Down

0 comments on commit 134fdda

Please sign in to comment.