I think this can just be done by allowing the deriving, i.e.

```rust
#[allow(raw_pointer_deriving)]
#[deriving(Clone, Eq, TotalEq, Hash)]
pub struct t { priv inner: *t_opaque }
```