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