rust-lang/rust — pull request #19832 by japaric (2014-12-14 06:43:29+00:00)
Title: Remove the `NoCopy` marker

Now that `Copy` is an opt-in bound trait, the `NoCopy` marker has become redundant/obsolete, this PR removes it. If you have a struct with a `NoCopy` field in it, then simply remove it, and make sure you **don't** implement the `Copy` trait on the struct. In some cases, you may want to add the `#[allow(missing_copy_implementations)]` attribute to avoid compiler warnings.

For example, the following struct

``` rust
pub struct Snapshot {
// Snapshots are tokens that should be created/consumed linearly.
marker: marker::NoCopy,

// Length of the undo log at the time the snapshot was taken.
length: uint,
}
```

would need to change to:

``` rust
// Snapshots are tokens that should be created/consumed linearly.
#[allow(missing_copy_implementations)]
pub struct Snapshot {
// Length of the undo log at the time the snapshot was taken.
length: uint,
}
```

[breaking-change]

---

r? @aturon / @alexcrichton

Alternatively, we could deprecate the marker first and remove it later. But, it seemed that the breaking change is easy enough to fix that we could remove the marker in a single step.