//@ check-pass #![feature(derive_coerce_pointee)] #![feature(arbitrary_self_types)] use std::ops::Deref; use std::marker::CoercePointee; use std::sync::Arc; trait MyTrait {} #[derive(CoercePointee)] #[repr(transparent)] struct MyArc>(Arc); impl> Deref for MyArc { type Target = T; fn deref(&self) -> &T { &self.0 } } trait Mirror { type Assoc; } impl Mirror for T { type Assoc = T; } // This is variant on "tests/ui/self/dyn-dispatch-requires-supertrait.rs" but with // a supertrait that requires normalization to match the pred in the old solver. trait MyOtherTrait: MyTrait<::Assoc> { fn foo(self: MyArc); } fn test(_: MyArc) {} fn main() {}