Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecate #[unsafe_destructor_blind_to_params] #38970

Merged
merged 1 commit into from
Jan 19, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/libsyntax/feature_gate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -691,10 +691,10 @@ pub const BUILTIN_ATTRIBUTES: &'static [(&'static str, AttributeType, AttributeG
cfg_fn!(omit_gdb_pretty_printer_section))),
("unsafe_destructor_blind_to_params",
Normal,
Gated(Stability::Unstable,
Gated(Stability::Deprecated("https://github.com/rust-lang/rust/issues/34761"),
"dropck_parametricity",
"unsafe_destructor_blind_to_params has unstable semantics \
and may be removed in the future",
"unsafe_destructor_blind_to_params has been replaced by \
may_dangle and will be removed in the future",
cfg_fn!(dropck_parametricity))),
("may_dangle",
Normal,
Expand Down
22 changes: 22 additions & 0 deletions src/test/compile-fail/feature-gate-dropck-ugeh-2.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
// Copyright 2016 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.

#![deny(deprecated)]
#![feature(dropck_parametricity)]

struct Foo;

impl Drop for Foo {
#[unsafe_destructor_blind_to_params]
//~^ ERROR use of deprecated attribute `dropck_parametricity`
fn drop(&mut self) {}
}

fn main() {}
2 changes: 1 addition & 1 deletion src/test/compile-fail/feature-gate-dropck-ugeh.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ struct Foo<T> { data: Vec<T> }

impl<T> Drop for Foo<T> {
#[unsafe_destructor_blind_to_params] // This is the UGEH attribute
//~^ ERROR unsafe_destructor_blind_to_params has unstable semantics
//~^ ERROR unsafe_destructor_blind_to_params has been replaced
fn drop(&mut self) { }
}

Expand Down