]> git.lizzy.rs Git - rust.git/blob - src/test/ui/feature-gates/feature-gate-may-dangle.rs
parser will not give wrong help message for 'public'
[rust.git] / src / test / ui / feature-gates / feature-gate-may-dangle.rs
1 // gate-test-dropck_eyepatch
2
3 // Check that `may_dangle` is rejected if `dropck_eyepatch` feature gate is absent.
4
5 struct Pt<A>(A);
6 unsafe impl<#[may_dangle] A> Drop for Pt<A> {
7     //~^ ERROR `may_dangle` has unstable semantics and may be removed in the future
8     fn drop(&mut self) { }
9 }
10
11 fn main() {}