1 // Regression test for #68641
6 fn copy<'a>(item: &Self::Item<'a>) -> Self::Item<'a> {
11 impl<T> UnsafeCopy for T {
13 //~^ ERROR the trait bound `T: Copy` is not satisfied
17 let mut s = String::from("Hello world!");
19 let copy = String::copy(&s);
21 // Do we indeed point to the samme memory?
22 assert!(s.as_ptr() == copy.as_ptr());
24 // Any use of `copy` is certeinly UB after this