2017-01-11 02:25:44 +01:00
|
|
|
// gate-test-dropck_eyepatch
|
|
|
|
|
2016-10-11 16:03:40 +02:00
|
|
|
// Check that `may_dangle` is rejected if `dropck_eyepatch` feature gate is absent.
|
|
|
|
|
|
|
|
struct Pt<A>(A);
|
2019-01-02 17:14:24 +03:00
|
|
|
unsafe impl<#[may_dangle] A> Drop for Pt<A> {
|
2019-07-12 19:33:51 -07:00
|
|
|
//~^ ERROR `may_dangle` has unstable semantics and may be removed in the future
|
2016-10-11 16:03:40 +02:00
|
|
|
fn drop(&mut self) { }
|
|
|
|
}
|
2019-01-02 17:14:24 +03:00
|
|
|
|
|
|
|
fn main() {}
|