Skip to content

Commit 134fdda

Browse files
authored
Fix MSRV compilation (#3927)
1 parent 7d0b11c commit 134fdda

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

CHANGELOG.md

+3
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@
3333
* Fix `catch` not being thread-safe.
3434
[#3879](https://github.com/rustwasm/wasm-bindgen/pull/3879)
3535

36+
* Fix MSRV compilation.
37+
[#3927](https://github.com/rustwasm/wasm-bindgen/pull/3927)
38+
3639
--------------------------------------------------------------------------------
3740

3841
## [0.2.92](https://github.com/rustwasm/wasm-bindgen/compare/0.2.91...0.2.92)

crates/backend/src/codegen.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -1716,9 +1716,9 @@ fn splat(
17161716
let mut args = Vec::new();
17171717
let mut names = Vec::new();
17181718

1719-
for n in 1..=4 {
1720-
let arg_name = format_ident!("{name}_{n}");
1721-
let prim_name = format_ident!("Prim{n}");
1719+
for n in 1_u32..=4 {
1720+
let arg_name = format_ident!("{}_{}", name, n);
1721+
let prim_name = format_ident!("Prim{}", n);
17221722
args.push(quote! {
17231723
#arg_name: <#abi as #wasm_bindgen::convert::WasmAbi>::#prim_name
17241724
});

src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1820,7 +1820,7 @@ pub mod __rt {
18201820
}
18211821
}
18221822

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

0 commit comments

Comments
 (0)