rust/tests/ui/feature-gates/feature-gate-may-dangle.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

12 lines
305 B
Rust
Raw Normal View History

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