1 If an impl has a generic parameter with the `#[may_dangle]` attribute, then
2 that impl must be declared as an `unsafe impl.
4 Erroneous code example:
7 #![feature(dropck_eyepatch)]
10 impl<#[may_dangle] X> Drop for Foo<X> {
11 fn drop(&mut self) { }
15 In this example, we are asserting that the destructor for `Foo` will not
16 access any data of type `X`, and require this assertion to be true for
17 overall safety in our program. The compiler does not currently attempt to
18 verify this assertion; therefore we must tag this `impl` as unsafe.