error[E0277]: the size for values of type `(dyn physics::spike::Bar + 'static)` cannot be known at compilation time
--> evo_model\src\physics\spike.rs:25:6
|
25 | impl HasFoos<Bar> for HasBars {
| ^^^^^^^^^^^^ doesn't have a size known at compile-time
But I don't understand why not. Why does it need to know the size of Bars? They're all in boxes.
Thank you both. That works. But that leads to a new problem:
pub struct HasHasFoos<H, F>
where H: HasFoos<F>, F: Foo + ?Sized
{
has_foos: H
}
error[E0392]: parameter `F` is never used
--> evo_model\src\physics\spike.rs:31:26
|
31 | pub struct HasHasFoos<H, F>
| ^ unused type parameter
|
= help: consider removing `F` or using a marker such as `std::marker::PhantomData`