#![allow(dead_code, deprecated, unused_variables, unused_mut)] #![allow(unused_variables)] trait Foo {} trait Bar: Sized {} struct Impl; impl Foo for Impl {} impl Bar for Impl {} fn main() { let x: &dyn Foo = &Impl; }