Suppose I've TabBar → Control → DisplayObject
.
This line doesn't work:
println!("{}", Rc::downcast::<dyn Control>(o).unwrap().x()); // 64
I get:
error[E0277]: the size for values of type `dyn Control` cannot be known at compilation time
--> src/main.rs:26:20
|
26 | println!("{}", Rc::downcast::<dyn Control>(o).unwrap().x()); // 64
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
|