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:
@@ -992,7 +992,7 @@ impl<'a> InterfaceGenerator<'a> {
|
|||||||
}
|
}
|
||||||
// Generate the `pub trait` which represents the host functionality for
|
// Generate the `pub trait` which represents the host functionality for
|
||||||
// this import.
|
// this import.
|
||||||
uwriteln!(self.src, "pub trait Host: Sized {{");
|
uwriteln!(self.src, "pub trait Host {{");
|
||||||
for (_, func) in iface.functions.iter() {
|
for (_, func) in iface.functions.iter() {
|
||||||
self.generate_function_trait_sig(owner, func);
|
self.generate_function_trait_sig(owner, func);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user