Fix MSRV compilation (#3927)

This commit is contained in:
daxpedda 2024-04-18 23:57:02 +02:00 committed by GitHub
parent 7d0b11c80e
commit 134fdda807
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 7 additions and 4 deletions

View File

@ -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)

View File

@ -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
});

View File

@ -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() {