Compiling playground v0.0.1 (/playground)
error[E0367]: `Drop` impl requires `T: std::marker::Copy` but the struct it is implemented for does not
--> src/lib.rs:3:37
|
3 | impl<T> Drop for Struct<T> where T: Copy {
| ^^^^
|
note: the implementor must specify the same requirement
--> src/lib.rs:1:1
|
1 | struct Struct<T>(std::marker::PhantomData<T>);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: aborting due to previous error
For more information about this error, try `rustc --explain E0367`.
error: could not compile `playground`.
To learn more, run the command again with --verbose.
Some searching led to dropck.rs, which is where this check is implemented. Looking at the blame, this was implemented due to issue #8142 ("Prohibit specialized drops"). It looks like this was implemented because pre-1.0 Rust incorrectly monomorphised drop glue (i.e. types that didn't match the where bounds would still get the Drop implementation applied to them). This was implemented as part of Rust 1.0.
Well, that answers the why part of the question. Now I'll head over to the internals forum to see if this can be relaxed (obviously this would require fixing Drop glue and monomorphization).