Browse Source

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>
pull/6122/head
Roman Volosatovs 2 years ago
committed by GitHub
parent
commit
c10e804617
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      crates/wit-bindgen/src/lib.rs

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

Loading…
Cancel
Save