# Autotrait to mark types without interior mutability

**URL:** <https://internals.rust-lang.org/t/autotrait-to-mark-types-without-interior-mutability/16636>\
**Category:** language design\
**Created:** [May 15, 2022, 9:52pm UTC](https://internals.rust-lang.org/t/autotrait-to-mark-types-without-interior-mutability/16636 "2022-05-15T21:52:31Z")\
**Posts on this page:** 1\
**Showing post:** 13

<div class="post-metadata">

**Author:** ![chrefr](https://avatars.discourse-cdn.com/v4/letter/c/e480ec/32.png) [@chrefr](https://internals.rust-lang.org/u/chrefr)\
**Post date:** [May 17, 2022, 3:19pm UTC](https://internals.rust-lang.org/t/autotrait-to-mark-types-without-interior-mutability/16636/13 "2022-05-17T15:19:43Z")

</div>

While `Unique<T>` is a lang item and has special SB treatment, it still can be viewed as just a pointer. And no one can, or should, prevent unsafe code from making the same invariant, and your code will allow people to break that.

Copying values is such a fundamental operation that unsafe code relies on invariants regarding it a lot; that is why we have `Copy`. Copying things that are not `Copy`, that is, were never meant to be copied and moreover, many times they were meant to _not_ be copied, is going to break a lot of things. If you want a trait for "can be safely duplicated", well, it has the name `Copy`.

Now there can (though I doubt that, since `Copy` is that essential) a type that is mistakenly not `Copy` and you cannot fix it for some reason, make a newtype and unsafely copy it, that's fine (assuming we suppose that's fine, see the above UCG issue). But doing that _generically_ is going to hurt you.

---

_[View the full topic](https://internals.rust-lang.org/t/autotrait-to-mark-types-without-interior-mutability/16636)._
