From c10e804617a0fa684a91aef49e05b526d5e08ff2 Mon Sep 17 00:00:00 2001 From: Roman Volosatovs Date: Wed, 29 Mar 2023 20:30:54 +0200 Subject: [PATCH] feat(wit-bindgen): relax `Sized` bound on `Host` traits (#6117) This allows to use implementations as trait objects (e.g. `Box`) Signed-off-by: Roman Volosatovs --- crates/wit-bindgen/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/wit-bindgen/src/lib.rs b/crates/wit-bindgen/src/lib.rs index a741e3e227..426c0a58ff 100644 --- a/crates/wit-bindgen/src/lib.rs +++ b/crates/wit-bindgen/src/lib.rs @@ -992,7 +992,7 @@ impl<'a> InterfaceGenerator<'a> { } // Generate the `pub trait` which represents the host functionality for // this import. - uwriteln!(self.src, "pub trait Host: Sized {{"); + uwriteln!(self.src, "pub trait Host {{"); for (_, func) in iface.functions.iter() { self.generate_function_trait_sig(owner, func); }