This has been working since Rust 1.0, I think:
trait Foo {
fn foo(&self);
}
trait Bar : Foo {}
impl Foo for () {
fn foo(&self) { println!("Hello") }
}
impl Bar for () {}
fn xxx(x: &dyn Bar) {
x.foo();
}
pub fn main() {
xxx(&());
}
> With the current beta version you can upcastRight. Now you can convert from `&dyn Bar` to `&dyn Foo` which wasn't possible before.