Rollup merge of #22787 - pnkfelix:reenable-gate-for-unsafe_no_drop_flag, r=alexcrichton
Turn `unsafe_no_drop_flag` back into a gated-feature. Fix #22173
This commit is contained in:
commit
f164254392
@ -243,7 +243,9 @@ pub static KNOWN_ATTRIBUTES: &'static [(&'static str, AttributeType)] = &[
|
|||||||
("static_assert", Whitelisted),
|
("static_assert", Whitelisted),
|
||||||
("no_debug", Whitelisted),
|
("no_debug", Whitelisted),
|
||||||
("omit_gdb_pretty_printer_section", Whitelisted),
|
("omit_gdb_pretty_printer_section", Whitelisted),
|
||||||
("unsafe_no_drop_flag", Whitelisted),
|
("unsafe_no_drop_flag", Gated("unsafe_no_drop_flag",
|
||||||
|
"unsafe_no_drop_flag has unstable semantics \
|
||||||
|
and may be removed in the future")),
|
||||||
|
|
||||||
// used in resolve
|
// used in resolve
|
||||||
("prelude_import", Whitelisted),
|
("prelude_import", Whitelisted),
|
||||||
|
23
src/test/compile-fail/unsafe_no_drop_flag-gate.rs
Normal file
23
src/test/compile-fail/unsafe_no_drop_flag-gate.rs
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
|
||||||
|
// file at the top-level directory of this distribution and at
|
||||||
|
// http://rust-lang.org/COPYRIGHT.
|
||||||
|
//
|
||||||
|
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
||||||
|
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
|
||||||
|
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
|
||||||
|
// option. This file may not be copied, modified, or distributed
|
||||||
|
// except according to those terms.
|
||||||
|
|
||||||
|
pub struct T;
|
||||||
|
|
||||||
|
#[unsafe_no_drop_flag]
|
||||||
|
//~^ ERROR unsafe_no_drop_flag has unstable semantics and may be removed
|
||||||
|
pub struct S {
|
||||||
|
pub x: T,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl Drop for S {
|
||||||
|
fn drop(&mut self) {}
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn main() {}
|
Loading…
Reference in New Issue
Block a user