diff options
| author | bors <bors@rust-lang.org> | 2015-04-28 17:12:36 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2015-04-28 17:12:36 +0000 |
| commit | 441b3f0c26c2e30ddb012be968141da7ce7d9d62 (patch) | |
| tree | 17170a9cd0d9a547ab5a90de4674507ce8c575de /src/libstd/sys/unix/stack_overflow.rs | |
| parent | d8b64c7fb2809eeba8ff9125cc95c4c38efb9a8a (diff) | |
| parent | 1f793482930ab98c3ecb2da7507cd4d55ace023c (diff) | |
| download | rust-441b3f0c26c2e30ddb012be968141da7ce7d9d62.tar.gz rust-441b3f0c26c2e30ddb012be968141da7ce7d9d62.zip | |
Auto merge of #24906 - pnkfelix:fsk-fix-24895, r=alexcrichton
dropck: Remove `Copy` from special-cased traits
Fix #24895.
[breaking-change]
What does this break? Basically, code that implements `Drop` and is
using `T:Copy` for one of its type parameters and is relying on the
Drop Check rule not applying to it.
Here is an example:
```rust
#![allow(dead_code,unused_variables,unused_assignments)]
struct D<T:Copy>(T);
impl<T:Copy> Drop for D<T> { fn drop(&mut self) { } }
trait UserT { fn c(&self) { } }
impl<T:Copy> UserT for T { }
struct E<T:UserT>(T);
impl<T:UserT> Drop for E<T> { fn drop(&mut self) { } }
// This one will start breaking.
fn foo() { let (d2, d1); d1 = D(34); d2 = D(&d1); }
#[cfg(this_one_does_and_should_always_break)]
fn bar() { let (e2, e1); e1 = E(34); e2 = E(&e1); }
fn main() {
foo();
}
```
Diffstat (limited to 'src/libstd/sys/unix/stack_overflow.rs')
0 files changed, 0 insertions, 0 deletions
