summaryrefslogtreecommitdiffstats
path: root/src/test/ui/feature-gates/feature-gate-may-dangle.rs
blob: 23db92c15df650155725b14555eeba49096a668d (plain)
1
2
3
4
5
6
7
8
9
10
11
// gate-test-dropck_eyepatch

// 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> {
    //~^ ERROR `may_dangle` has unstable semantics and may be removed in the future
    fn drop(&mut self) { }
}

fn main() {}