wiggle: fix compilation with async functions when tracing is off (#5203)

Fixes #5202
This commit is contained in:
Joe Shaw
2022-11-04 14:43:00 -04:00
committed by GitHub
parent 387426e7f4
commit 7b7eeac1be
2 changed files with 21 additions and 1 deletions

View File

@@ -118,7 +118,11 @@ fn _define_func(
}.instrument(_span) }.instrument(_span)
) )
} else { } else {
quote!(#body) quote!(
async move {
#body
}
)
}; };
( (
quote!( quote!(

View File

@@ -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
}
}