Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
10 changes: 2 additions & 8 deletions crates/component-macro/tests/expanded/char.rs
Original file line number Diff line number Diff line change
Expand Up @@ -316,10 +316,7 @@ pub mod exports {
&self,
mut store: S,
arg0: char,
) -> wasmtime::Result<()>
where
<S as wasmtime::AsContext>::Data: Send,
{
) -> wasmtime::Result<()> {
let callee = unsafe {
wasmtime::component::TypedFunc::<
(char,),
Expand All @@ -334,10 +331,7 @@ pub mod exports {
pub fn call_return_char<S: wasmtime::AsContextMut>(
&self,
mut store: S,
) -> wasmtime::Result<char>
where
<S as wasmtime::AsContext>::Data: Send,
{
) -> wasmtime::Result<char> {
let callee = unsafe {
wasmtime::component::TypedFunc::<
(),
Expand Down
60 changes: 12 additions & 48 deletions crates/component-macro/tests/expanded/conventions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -608,10 +608,7 @@ pub mod exports {
pub fn call_kebab_case<S: wasmtime::AsContextMut>(
&self,
mut store: S,
) -> wasmtime::Result<()>
where
<S as wasmtime::AsContext>::Data: Send,
{
) -> wasmtime::Result<()> {
let callee = unsafe {
wasmtime::component::TypedFunc::<
(),
Expand All @@ -626,10 +623,7 @@ pub mod exports {
&self,
mut store: S,
arg0: LudicrousSpeed,
) -> wasmtime::Result<()>
where
<S as wasmtime::AsContext>::Data: Send,
{
) -> wasmtime::Result<()> {
let callee = unsafe {
wasmtime::component::TypedFunc::<
(LudicrousSpeed,),
Expand All @@ -643,10 +637,7 @@ pub mod exports {
pub fn call_function_with_dashes<S: wasmtime::AsContextMut>(
&self,
mut store: S,
) -> wasmtime::Result<()>
where
<S as wasmtime::AsContext>::Data: Send,
{
) -> wasmtime::Result<()> {
let callee = unsafe {
wasmtime::component::TypedFunc::<
(),
Expand All @@ -659,10 +650,7 @@ pub mod exports {
}
pub fn call_function_with_no_weird_characters<
S: wasmtime::AsContextMut,
>(&self, mut store: S) -> wasmtime::Result<()>
where
<S as wasmtime::AsContext>::Data: Send,
{
>(&self, mut store: S) -> wasmtime::Result<()> {
let callee = unsafe {
wasmtime::component::TypedFunc::<
(),
Expand All @@ -676,10 +664,7 @@ pub mod exports {
pub fn call_apple<S: wasmtime::AsContextMut>(
&self,
mut store: S,
) -> wasmtime::Result<()>
where
<S as wasmtime::AsContext>::Data: Send,
{
) -> wasmtime::Result<()> {
let callee = unsafe {
wasmtime::component::TypedFunc::<
(),
Expand All @@ -693,10 +678,7 @@ pub mod exports {
pub fn call_apple_pear<S: wasmtime::AsContextMut>(
&self,
mut store: S,
) -> wasmtime::Result<()>
where
<S as wasmtime::AsContext>::Data: Send,
{
) -> wasmtime::Result<()> {
let callee = unsafe {
wasmtime::component::TypedFunc::<
(),
Expand All @@ -710,10 +692,7 @@ pub mod exports {
pub fn call_apple_pear_grape<S: wasmtime::AsContextMut>(
&self,
mut store: S,
) -> wasmtime::Result<()>
where
<S as wasmtime::AsContext>::Data: Send,
{
) -> wasmtime::Result<()> {
let callee = unsafe {
wasmtime::component::TypedFunc::<
(),
Expand All @@ -727,10 +706,7 @@ pub mod exports {
pub fn call_a0<S: wasmtime::AsContextMut>(
&self,
mut store: S,
) -> wasmtime::Result<()>
where
<S as wasmtime::AsContext>::Data: Send,
{
) -> wasmtime::Result<()> {
let callee = unsafe {
wasmtime::component::TypedFunc::<
(),
Expand All @@ -749,10 +725,7 @@ pub mod exports {
pub fn call_is_xml<S: wasmtime::AsContextMut>(
&self,
mut store: S,
) -> wasmtime::Result<()>
where
<S as wasmtime::AsContext>::Data: Send,
{
) -> wasmtime::Result<()> {
let callee = unsafe {
wasmtime::component::TypedFunc::<
(),
Expand All @@ -766,10 +739,7 @@ pub mod exports {
pub fn call_explicit<S: wasmtime::AsContextMut>(
&self,
mut store: S,
) -> wasmtime::Result<()>
where
<S as wasmtime::AsContext>::Data: Send,
{
) -> wasmtime::Result<()> {
let callee = unsafe {
wasmtime::component::TypedFunc::<
(),
Expand All @@ -783,10 +753,7 @@ pub mod exports {
pub fn call_explicit_kebab<S: wasmtime::AsContextMut>(
&self,
mut store: S,
) -> wasmtime::Result<()>
where
<S as wasmtime::AsContext>::Data: Send,
{
) -> wasmtime::Result<()> {
let callee = unsafe {
wasmtime::component::TypedFunc::<
(),
Expand All @@ -801,10 +768,7 @@ pub mod exports {
pub fn call_bool<S: wasmtime::AsContextMut>(
&self,
mut store: S,
) -> wasmtime::Result<()>
where
<S as wasmtime::AsContext>::Data: Send,
{
) -> wasmtime::Result<()> {
let callee = unsafe {
wasmtime::component::TypedFunc::<
(),
Expand Down
35 changes: 7 additions & 28 deletions crates/component-macro/tests/expanded/flags.rs
Original file line number Diff line number Diff line change
Expand Up @@ -713,10 +713,7 @@ pub mod exports {
&self,
mut store: S,
arg0: Flag1,
) -> wasmtime::Result<Flag1>
where
<S as wasmtime::AsContext>::Data: Send,
{
) -> wasmtime::Result<Flag1> {
let callee = unsafe {
wasmtime::component::TypedFunc::<
(Flag1,),
Expand All @@ -731,10 +728,7 @@ pub mod exports {
&self,
mut store: S,
arg0: Flag2,
) -> wasmtime::Result<Flag2>
where
<S as wasmtime::AsContext>::Data: Send,
{
) -> wasmtime::Result<Flag2> {
let callee = unsafe {
wasmtime::component::TypedFunc::<
(Flag2,),
Expand All @@ -749,10 +743,7 @@ pub mod exports {
&self,
mut store: S,
arg0: Flag4,
) -> wasmtime::Result<Flag4>
where
<S as wasmtime::AsContext>::Data: Send,
{
) -> wasmtime::Result<Flag4> {
let callee = unsafe {
wasmtime::component::TypedFunc::<
(Flag4,),
Expand All @@ -767,10 +758,7 @@ pub mod exports {
&self,
mut store: S,
arg0: Flag8,
) -> wasmtime::Result<Flag8>
where
<S as wasmtime::AsContext>::Data: Send,
{
) -> wasmtime::Result<Flag8> {
let callee = unsafe {
wasmtime::component::TypedFunc::<
(Flag8,),
Expand All @@ -785,10 +773,7 @@ pub mod exports {
&self,
mut store: S,
arg0: Flag16,
) -> wasmtime::Result<Flag16>
where
<S as wasmtime::AsContext>::Data: Send,
{
) -> wasmtime::Result<Flag16> {
let callee = unsafe {
wasmtime::component::TypedFunc::<
(Flag16,),
Expand All @@ -803,10 +788,7 @@ pub mod exports {
&self,
mut store: S,
arg0: Flag32,
) -> wasmtime::Result<Flag32>
where
<S as wasmtime::AsContext>::Data: Send,
{
) -> wasmtime::Result<Flag32> {
let callee = unsafe {
wasmtime::component::TypedFunc::<
(Flag32,),
Expand All @@ -821,10 +803,7 @@ pub mod exports {
&self,
mut store: S,
arg0: Flag64,
) -> wasmtime::Result<Flag64>
where
<S as wasmtime::AsContext>::Data: Send,
{
) -> wasmtime::Result<Flag64> {
let callee = unsafe {
wasmtime::component::TypedFunc::<
(Flag64,),
Expand Down
20 changes: 4 additions & 16 deletions crates/component-macro/tests/expanded/floats.rs
Original file line number Diff line number Diff line change
Expand Up @@ -350,10 +350,7 @@ pub mod exports {
&self,
mut store: S,
arg0: f32,
) -> wasmtime::Result<()>
where
<S as wasmtime::AsContext>::Data: Send,
{
) -> wasmtime::Result<()> {
let callee = unsafe {
wasmtime::component::TypedFunc::<
(f32,),
Expand All @@ -368,10 +365,7 @@ pub mod exports {
&self,
mut store: S,
arg0: f64,
) -> wasmtime::Result<()>
where
<S as wasmtime::AsContext>::Data: Send,
{
) -> wasmtime::Result<()> {
let callee = unsafe {
wasmtime::component::TypedFunc::<
(f64,),
Expand All @@ -385,10 +379,7 @@ pub mod exports {
pub fn call_f32_result<S: wasmtime::AsContextMut>(
&self,
mut store: S,
) -> wasmtime::Result<f32>
where
<S as wasmtime::AsContext>::Data: Send,
{
) -> wasmtime::Result<f32> {
let callee = unsafe {
wasmtime::component::TypedFunc::<
(),
Expand All @@ -402,10 +393,7 @@ pub mod exports {
pub fn call_f64_result<S: wasmtime::AsContextMut>(
&self,
mut store: S,
) -> wasmtime::Result<f64>
where
<S as wasmtime::AsContext>::Data: Send,
{
) -> wasmtime::Result<f64> {
let callee = unsafe {
wasmtime::component::TypedFunc::<
(),
Expand Down
5 changes: 1 addition & 4 deletions crates/component-macro/tests/expanded/function-new.rs
Original file line number Diff line number Diff line change
Expand Up @@ -161,10 +161,7 @@ const _: () = {
pub fn call_new<S: wasmtime::AsContextMut>(
&self,
mut store: S,
) -> wasmtime::Result<()>
where
<S as wasmtime::AsContext>::Data: Send,
{
) -> wasmtime::Result<()> {
let callee = unsafe {
wasmtime::component::TypedFunc::<(), ()>::new_unchecked(self.new)
};
Expand Down
Loading