// Regression test for #68656 trait UnsafeCopy { type Item<'a>: std::ops::Deref; fn bug<'a>(item: &Self::Item<'a>) -> () { let x: T = **item; &x as *const _; } } impl UnsafeCopy for T { type Item<'a> = T; //~^ ERROR type mismatch resolving `::Target == T` } fn main() { <&'static str>::bug(&""); }