use std::marker::PhantomData; struct Example(PhantomData<(fn(E), fn(FakeParam))>); struct NoLifetime; struct Immutable<'a>(PhantomData<&'a ()>); impl<'a, E: 'a> Copy for Example> {} impl<'a, E: 'a> Clone for Example> { fn clone(&self) -> Self { *self } } impl Example { unsafe fn change(self) -> Example { Example(PhantomData) } } impl Example { fn the_ice(&mut self) -> Example> { unsafe { self.change() } //~^ ERROR cannot move out of `*self` which is behind a mutable reference } } fn main() {}