feat(wit-bindgen): relax Sized bound on Host traits (#6117)

This allows to use implementations as trait objects
(e.g. `Box<dyn myiface::Host>`)

Signed-off-by: Roman Volosatovs <roman@profian.com>
This commit is contained in:
Roman Volosatovs
2023-03-29 20:30:54 +02:00
committed by GitHub
parent 0b0ac3ff73
commit c10e804617

View File

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