about summary refs log tree commit diff
diff options
context:
space:
mode:
authorAndrew Paseltiner <apaseltiner@gmail.com>2017-01-10 17:52:33 -0500
committerAndrew Paseltiner <apaseltiner@gmail.com>2017-01-10 18:10:19 -0500
commit9940db63ef60518f6c9824787a979beb09e716ba (patch)
tree0498a74f80528fd15c1ab14bff5f2a4f274838a0
parent7bffede97cf58f7159e261eac592f9cf88ce209d (diff)
downloadrust-9940db63ef60518f6c9824787a979beb09e716ba.tar.gz
rust-9940db63ef60518f6c9824787a979beb09e716ba.zip
Deprecate `#[unsafe_destructor_blind_to_params]`
CC #34761
-rw-r--r--src/libsyntax/feature_gate.rs6
-rw-r--r--src/test/compile-fail/feature-gate-dropck-ugeh-2.rs22
-rw-r--r--src/test/compile-fail/feature-gate-dropck-ugeh.rs2
3 files changed, 26 insertions, 4 deletions
diff --git a/src/libsyntax/feature_gate.rs b/src/libsyntax/feature_gate.rs
index 50924124758..3826db455be 100644
--- a/src/libsyntax/feature_gate.rs
+++ b/src/libsyntax/feature_gate.rs
@@ -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,
diff --git a/src/test/compile-fail/feature-gate-dropck-ugeh-2.rs b/src/test/compile-fail/feature-gate-dropck-ugeh-2.rs
new file mode 100644
index 00000000000..70ec561439c
--- /dev/null
+++ b/src/test/compile-fail/feature-gate-dropck-ugeh-2.rs
@@ -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() {}
diff --git a/src/test/compile-fail/feature-gate-dropck-ugeh.rs b/src/test/compile-fail/feature-gate-dropck-ugeh.rs
index aa479a987a3..b9990b536e7 100644
--- a/src/test/compile-fail/feature-gate-dropck-ugeh.rs
+++ b/src/test/compile-fail/feature-gate-dropck-ugeh.rs
@@ -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) { }
 }