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