diff --git a/crates/wiggle/generate/src/funcs.rs b/crates/wiggle/generate/src/funcs.rs index 7fd5957969..f124d066a4 100644 --- a/crates/wiggle/generate/src/funcs.rs +++ b/crates/wiggle/generate/src/funcs.rs @@ -118,7 +118,11 @@ fn _define_func( }.instrument(_span) ) } else { - quote!(#body) + quote!( + async move { + #body + } + ) }; ( quote!( diff --git a/crates/wiggle/tests/tracing.rs b/crates/wiggle/tests/tracing.rs new file mode 100644 index 0000000000..d8869abe48 --- /dev/null +++ b/crates/wiggle/tests/tracing.rs @@ -0,0 +1,16 @@ +// This just tests that things compile when `tracing: false` is set, +// which isn't the default. + +wiggle::from_witx!({ + witx: ["$CARGO_MANIFEST_DIR/tests/atoms.witx"], + async: { + atoms::double_int_return_float, + }, + tracing: false, +}); + +impl wiggle::GuestErrorType for types::Errno { + fn success() -> Self { + types::Errno::Ok + } +}