wiggle: fix compilation with async functions when tracing is off (#5203)
Fixes #5202
This commit is contained in:
@@ -118,7 +118,11 @@ fn _define_func(
|
|||||||
}.instrument(_span)
|
}.instrument(_span)
|
||||||
)
|
)
|
||||||
} else {
|
} else {
|
||||||
quote!(#body)
|
quote!(
|
||||||
|
async move {
|
||||||
|
#body
|
||||||
|
}
|
||||||
|
)
|
||||||
};
|
};
|
||||||
(
|
(
|
||||||
quote!(
|
quote!(
|
||||||
|
|||||||
16
crates/wiggle/tests/tracing.rs
Normal file
16
crates/wiggle/tests/tracing.rs
Normal 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
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user