Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 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
4 changes: 2 additions & 2 deletions crates/component-macro/tests/expanded/char_concurrent.rs
Original file line number Diff line number Diff line change
Expand Up @@ -191,12 +191,12 @@ pub mod foo {
use wasmtime::component::__internal::Box;
pub trait HostWithStore: wasmtime::component::HasData + Send {
/// A function that accepts a character
fn take_char<T>(
fn take_char<T: Send>(
accessor: &wasmtime::component::Accessor<T, Self>,
x: char,
) -> impl ::core::future::Future<Output = ()> + Send;
/// A function that returns a character
fn return_char<T>(
fn return_char<T: Send>(
accessor: &wasmtime::component::Accessor<T, Self>,
) -> impl ::core::future::Future<Output = char> + Send;
}
Expand Down
24 changes: 12 additions & 12 deletions crates/component-macro/tests/expanded/conventions_concurrent.rs
Original file line number Diff line number Diff line change
Expand Up @@ -224,47 +224,47 @@ pub mod foo {
);
};
pub trait HostWithStore: wasmtime::component::HasData + Send {
fn kebab_case<T>(
fn kebab_case<T: Send>(
accessor: &wasmtime::component::Accessor<T, Self>,
) -> impl ::core::future::Future<Output = ()> + Send;
fn foo<T>(
fn foo<T: Send>(
accessor: &wasmtime::component::Accessor<T, Self>,
x: LudicrousSpeed,
) -> impl ::core::future::Future<Output = ()> + Send;
fn function_with_dashes<T>(
fn function_with_dashes<T: Send>(
accessor: &wasmtime::component::Accessor<T, Self>,
) -> impl ::core::future::Future<Output = ()> + Send;
fn function_with_no_weird_characters<T>(
fn function_with_no_weird_characters<T: Send>(
accessor: &wasmtime::component::Accessor<T, Self>,
) -> impl ::core::future::Future<Output = ()> + Send;
fn apple<T>(
fn apple<T: Send>(
accessor: &wasmtime::component::Accessor<T, Self>,
) -> impl ::core::future::Future<Output = ()> + Send;
fn apple_pear<T>(
fn apple_pear<T: Send>(
accessor: &wasmtime::component::Accessor<T, Self>,
) -> impl ::core::future::Future<Output = ()> + Send;
fn apple_pear_grape<T>(
fn apple_pear_grape<T: Send>(
accessor: &wasmtime::component::Accessor<T, Self>,
) -> impl ::core::future::Future<Output = ()> + Send;
fn a0<T>(
fn a0<T: Send>(
accessor: &wasmtime::component::Accessor<T, Self>,
) -> impl ::core::future::Future<Output = ()> + Send;
/// Comment out identifiers that collide when mapped to snake_case, for now; see
/// https://github.com/WebAssembly/component-model/issues/118
/// APPLE: func()
/// APPLE-pear-GRAPE: func()
/// apple-PEAR-grape: func()
fn is_xml<T>(
fn is_xml<T: Send>(
accessor: &wasmtime::component::Accessor<T, Self>,
) -> impl ::core::future::Future<Output = ()> + Send;
fn explicit<T>(
fn explicit<T: Send>(
accessor: &wasmtime::component::Accessor<T, Self>,
) -> impl ::core::future::Future<Output = ()> + Send;
fn explicit_kebab<T>(
fn explicit_kebab<T: Send>(
accessor: &wasmtime::component::Accessor<T, Self>,
) -> impl ::core::future::Future<Output = ()> + Send;
/// Identifiers with the same name as keywords are quoted.
fn bool<T>(
fn bool<T: Send>(
accessor: &wasmtime::component::Accessor<T, Self>,
) -> impl ::core::future::Future<Output = ()> + Send;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ pub mod a {
);
};
pub trait HostWithStore: wasmtime::component::HasData + Send {
fn f<T>(
fn f<T: Send>(
accessor: &wasmtime::component::Accessor<T, Self>,
) -> impl ::core::future::Future<Output = LiveType> + Send;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ pub struct FooIndices {}
/// [`Linker`]: wasmtime::component::Linker
pub struct Foo {}
pub trait FooImportsWithStore: wasmtime::component::HasData + Send {
fn foo<T>(
fn foo<T: Send>(
accessor: &wasmtime::component::Accessor<T, Self>,
) -> impl ::core::future::Future<Output = ()> + Send;
}
Expand Down
14 changes: 7 additions & 7 deletions crates/component-macro/tests/expanded/flags_concurrent.rs
Original file line number Diff line number Diff line change
Expand Up @@ -304,31 +304,31 @@ pub mod foo {
assert!(4 == < Flag64 as wasmtime::component::ComponentType >::ALIGN32);
};
pub trait HostWithStore: wasmtime::component::HasData + Send {
fn roundtrip_flag1<T>(
fn roundtrip_flag1<T: Send>(
accessor: &wasmtime::component::Accessor<T, Self>,
x: Flag1,
) -> impl ::core::future::Future<Output = Flag1> + Send;
fn roundtrip_flag2<T>(
fn roundtrip_flag2<T: Send>(
accessor: &wasmtime::component::Accessor<T, Self>,
x: Flag2,
) -> impl ::core::future::Future<Output = Flag2> + Send;
fn roundtrip_flag4<T>(
fn roundtrip_flag4<T: Send>(
accessor: &wasmtime::component::Accessor<T, Self>,
x: Flag4,
) -> impl ::core::future::Future<Output = Flag4> + Send;
fn roundtrip_flag8<T>(
fn roundtrip_flag8<T: Send>(
accessor: &wasmtime::component::Accessor<T, Self>,
x: Flag8,
) -> impl ::core::future::Future<Output = Flag8> + Send;
fn roundtrip_flag16<T>(
fn roundtrip_flag16<T: Send>(
accessor: &wasmtime::component::Accessor<T, Self>,
x: Flag16,
) -> impl ::core::future::Future<Output = Flag16> + Send;
fn roundtrip_flag32<T>(
fn roundtrip_flag32<T: Send>(
accessor: &wasmtime::component::Accessor<T, Self>,
x: Flag32,
) -> impl ::core::future::Future<Output = Flag32> + Send;
fn roundtrip_flag64<T>(
fn roundtrip_flag64<T: Send>(
accessor: &wasmtime::component::Accessor<T, Self>,
x: Flag64,
) -> impl ::core::future::Future<Output = Flag64> + Send;
Expand Down
8 changes: 4 additions & 4 deletions crates/component-macro/tests/expanded/floats_concurrent.rs
Original file line number Diff line number Diff line change
Expand Up @@ -192,18 +192,18 @@ pub mod foo {
#[allow(unused_imports)]
use wasmtime::component::__internal::Box;
pub trait HostWithStore: wasmtime::component::HasData + Send {
fn f32_param<T>(
fn f32_param<T: Send>(
accessor: &wasmtime::component::Accessor<T, Self>,
x: f32,
) -> impl ::core::future::Future<Output = ()> + Send;
fn f64_param<T>(
fn f64_param<T: Send>(
accessor: &wasmtime::component::Accessor<T, Self>,
x: f64,
) -> impl ::core::future::Future<Output = ()> + Send;
fn f32_result<T>(
fn f32_result<T: Send>(
accessor: &wasmtime::component::Accessor<T, Self>,
) -> impl ::core::future::Future<Output = f32> + Send;
fn f64_result<T>(
fn f64_result<T: Send>(
accessor: &wasmtime::component::Accessor<T, Self>,
) -> impl ::core::future::Future<Output = f64> + Send;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ pub struct Host_Indices {}
/// [`Linker`]: wasmtime::component::Linker
pub struct Host_ {}
pub trait Host_ImportsWithStore: wasmtime::component::HasData + Send {
fn foo<T>(
fn foo<T: Send>(
accessor: &wasmtime::component::Accessor<T, Self>,
) -> impl ::core::future::Future<Output = ()> + Send;
}
Expand Down
36 changes: 18 additions & 18 deletions crates/component-macro/tests/expanded/integers_concurrent.rs
Original file line number Diff line number Diff line change
Expand Up @@ -192,39 +192,39 @@ pub mod foo {
#[allow(unused_imports)]
use wasmtime::component::__internal::Box;
pub trait HostWithStore: wasmtime::component::HasData + Send {
fn a1<T>(
fn a1<T: Send>(
accessor: &wasmtime::component::Accessor<T, Self>,
x: u8,
) -> impl ::core::future::Future<Output = ()> + Send;
fn a2<T>(
fn a2<T: Send>(
accessor: &wasmtime::component::Accessor<T, Self>,
x: i8,
) -> impl ::core::future::Future<Output = ()> + Send;
fn a3<T>(
fn a3<T: Send>(
accessor: &wasmtime::component::Accessor<T, Self>,
x: u16,
) -> impl ::core::future::Future<Output = ()> + Send;
fn a4<T>(
fn a4<T: Send>(
accessor: &wasmtime::component::Accessor<T, Self>,
x: i16,
) -> impl ::core::future::Future<Output = ()> + Send;
fn a5<T>(
fn a5<T: Send>(
accessor: &wasmtime::component::Accessor<T, Self>,
x: u32,
) -> impl ::core::future::Future<Output = ()> + Send;
fn a6<T>(
fn a6<T: Send>(
accessor: &wasmtime::component::Accessor<T, Self>,
x: i32,
) -> impl ::core::future::Future<Output = ()> + Send;
fn a7<T>(
fn a7<T: Send>(
accessor: &wasmtime::component::Accessor<T, Self>,
x: u64,
) -> impl ::core::future::Future<Output = ()> + Send;
fn a8<T>(
fn a8<T: Send>(
accessor: &wasmtime::component::Accessor<T, Self>,
x: i64,
) -> impl ::core::future::Future<Output = ()> + Send;
fn a9<T>(
fn a9<T: Send>(
accessor: &wasmtime::component::Accessor<T, Self>,
p1: u8,
p2: i8,
Expand All @@ -235,31 +235,31 @@ pub mod foo {
p7: u64,
p8: i64,
) -> impl ::core::future::Future<Output = ()> + Send;
fn r1<T>(
fn r1<T: Send>(
accessor: &wasmtime::component::Accessor<T, Self>,
) -> impl ::core::future::Future<Output = u8> + Send;
fn r2<T>(
fn r2<T: Send>(
accessor: &wasmtime::component::Accessor<T, Self>,
) -> impl ::core::future::Future<Output = i8> + Send;
fn r3<T>(
fn r3<T: Send>(
accessor: &wasmtime::component::Accessor<T, Self>,
) -> impl ::core::future::Future<Output = u16> + Send;
fn r4<T>(
fn r4<T: Send>(
accessor: &wasmtime::component::Accessor<T, Self>,
) -> impl ::core::future::Future<Output = i16> + Send;
fn r5<T>(
fn r5<T: Send>(
accessor: &wasmtime::component::Accessor<T, Self>,
) -> impl ::core::future::Future<Output = u32> + Send;
fn r6<T>(
fn r6<T: Send>(
accessor: &wasmtime::component::Accessor<T, Self>,
) -> impl ::core::future::Future<Output = i32> + Send;
fn r7<T>(
fn r7<T: Send>(
accessor: &wasmtime::component::Accessor<T, Self>,
) -> impl ::core::future::Future<Output = u64> + Send;
fn r8<T>(
fn r8<T: Send>(
accessor: &wasmtime::component::Accessor<T, Self>,
) -> impl ::core::future::Future<Output = i64> + Send;
fn pair_ret<T>(
fn pair_ret<T: Send>(
accessor: &wasmtime::component::Accessor<T, Self>,
) -> impl ::core::future::Future<Output = (i64, u8)> + Send;
}
Expand Down
Loading
Loading