Skip to content

Commit c61a825

Browse files
committed
post-merge fixes
1 parent 6656c9b commit c61a825

File tree

3 files changed

+30
-14
lines changed

3 files changed

+30
-14
lines changed

crates/environ/src/component/types_builder.rs

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -577,16 +577,24 @@ impl ComponentTypesBuilder {
577577
self.add_tuple_type(TypeTuple { types, abi })
578578
}
579579

580-
fn fixed_size_list_type(&mut self, types: TypesRef<'_>, ty: &ComponentValType, size: u32) -> Result<TypeFixedSizeListIndex> {
580+
fn fixed_size_list_type(
581+
&mut self,
582+
types: TypesRef<'_>,
583+
ty: &ComponentValType,
584+
size: u32,
585+
) -> Result<TypeFixedSizeListIndex> {
581586
assert_eq!(types.id(), self.module_types.validator_id());
582587
let element = self.valtype(types, ty)?;
583588
Ok(self.new_fixed_size_list_type(element, size))
584589
}
585590

586-
pub(crate) fn new_fixed_size_list_type(&mut self, element: InterfaceType, size: u32) -> TypeFixedSizeListIndex {
591+
pub(crate) fn new_fixed_size_list_type(
592+
&mut self,
593+
element: InterfaceType,
594+
size: u32,
595+
) -> TypeFixedSizeListIndex {
587596
let element_abi = self.component_types.canonical_abi(&element);
588-
let abi = CanonicalAbiInfo::record(
589-
(0..size).into_iter().map(|_| element_abi));
597+
let abi = CanonicalAbiInfo::record((0..size).into_iter().map(|_| element_abi));
590598
self.add_fixed_size_list_type(TypeFixedSizeList { element, size, abi })
591599
}
592600

@@ -1107,7 +1115,11 @@ impl TypeInformation {
11071115
}
11081116

11091117
fn fixed_size_lists(&mut self, types: &ComponentTypesBuilder, ty: &TypeFixedSizeList) {
1110-
self.build_record((0..ty.size).into_iter().map(|_| types.type_information(&ty.element)));
1118+
self.build_record(
1119+
(0..ty.size)
1120+
.into_iter()
1121+
.map(|_| types.type_information(&ty.element)),
1122+
);
11111123
}
11121124

11131125
fn enums(&mut self, _types: &ComponentTypesBuilder, _ty: &TypeEnum) {

crates/environ/src/fact/trampoline.rs

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,10 @@ use crate::component::{
1919
CanonicalAbiInfo, ComponentTypesBuilder, FLAG_MAY_ENTER, FLAG_MAY_LEAVE, FixedEncoding as FE,
2020
FlatType, InterfaceType, MAX_FLAT_ASYNC_PARAMS, MAX_FLAT_PARAMS, PREPARE_ASYNC_NO_RESULT,
2121
PREPARE_ASYNC_WITH_RESULT, START_FLAG_ASYNC_CALLEE, StringEncoding, Transcode,
22-
TypeComponentLocalErrorContextTableIndex, TypeEnumIndex, TypeFlagsIndex, TypeFutureTableIndex,
23-
TypeListIndex, TypeOptionIndex, TypeRecordIndex, TypeResourceTableIndex, TypeResultIndex,
24-
TypeStreamTableIndex, TypeTupleIndex, TypeVariantIndex, VariantInfo,
22+
TypeComponentLocalErrorContextTableIndex, TypeEnumIndex, TypeFixedSizeListIndex,
23+
TypeFlagsIndex, TypeFutureTableIndex, TypeListIndex, TypeOptionIndex, TypeRecordIndex,
24+
TypeResourceTableIndex, TypeResultIndex, TypeStreamTableIndex, TypeTupleIndex,
25+
TypeVariantIndex, VariantInfo,
2526
};
2627
use crate::fact::signature::Signature;
2728
use crate::fact::transcode::Transcoder;
@@ -2859,10 +2860,14 @@ impl<'a, 'b> Compiler<'a, 'b> {
28592860
// TODO: subtyping
28602861
assert_eq!(src_ty.size, dst_ty.size);
28612862

2862-
let srcs = src
2863-
.record_field_srcs(self.types, (0..src_ty.size).into_iter().map(|_| src_ty.element));
2864-
let dsts = dst
2865-
.record_field_dsts(self.types, (0..dst_ty.size).into_iter().map(|_| dst_ty.element));
2863+
let srcs = src.record_field_srcs(
2864+
self.types,
2865+
(0..src_ty.size).into_iter().map(|_| src_ty.element),
2866+
);
2867+
let dsts = dst.record_field_dsts(
2868+
self.types,
2869+
(0..dst_ty.size).into_iter().map(|_| dst_ty.element),
2870+
);
28662871
for (src, dst) in srcs.zip(dsts) {
28672872
self.translate(&src_ty.element, &src, &dst_ty.element, &dst);
28682873
}

crates/wasmtime/src/config.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1268,7 +1268,6 @@ impl Config {
12681268
self.wasm_features(WasmFeatures::CM_THREADING, enable);
12691269
self
12701270
}
1271-
12721271
/// This corresponds to the 📝 emoji in the component model specification.
12731272
///
12741273
/// Please note that Wasmtime's support for this feature is _very_
@@ -1302,7 +1301,7 @@ impl Config {
13021301
/// incomplete.
13031302
#[cfg(feature = "component-model")]
13041303
pub fn wasm_component_model_fixed_size_lists(&mut self, enable: bool) -> &mut Self {
1305-
self.wasm_feature(WasmFeatures::CM_FIXED_SIZE_LIST, enable);
1304+
self.wasm_features(WasmFeatures::CM_FIXED_SIZE_LIST, enable);
13061305
self
13071306
}
13081307

0 commit comments

Comments
 (0)