error: the `foo` method cannot be invoked on a trait object --> $DIR/by-value-trait-object-safety.rs:18:7 | LL | fn foo(self) -> String where Self: Sized; | ----- this has a `Sized` requirement ... LL | x.foo(); | ^^^ error: aborting due to previous error