about summary refs log tree commit diff
path: root/src/libsyntax
diff options
context:
space:
mode:
authorFelix S. Klock II <pnkfelix@pnkfx.org>2015-07-16 14:56:03 +0200
committerFelix S. Klock II <pnkfelix@pnkfx.org>2015-10-06 14:16:20 +0200
commit9868df2fd5d9364a1a1d8b22847c7b442a77a88b (patch)
tree67ad36060ecf2da46c67c3d515c660363264ed8e /src/libsyntax
parentc298efdb1f5e9334c25dcc1ea98fcc35a0b4c05d (diff)
downloadrust-9868df2fd5d9364a1a1d8b22847c7b442a77a88b.tar.gz
rust-9868df2fd5d9364a1a1d8b22847c7b442a77a88b.zip
Non-parametric dropck; instead trust an unsafe attribute (RFC 1238).
Implement cannot-assume-parametricity (CAP) from RFC 1238, and add the
UGEH attribute.

----

Note that we check for the attribute attached to the dtor method, not
the Drop impl.

(This is just to match the specification of RFC and the tests; I am
not wedded to this approach.)
Diffstat (limited to 'src/libsyntax')
-rw-r--r--src/libsyntax/feature_gate.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/libsyntax/feature_gate.rs b/src/libsyntax/feature_gate.rs
index 18c6d74d62e..e364716bdf2 100644
--- a/src/libsyntax/feature_gate.rs
+++ b/src/libsyntax/feature_gate.rs
@@ -136,6 +136,10 @@ const KNOWN_FEATURES: &'static [(&'static str, &'static str, Option<u32>, Status
     // switch to Accepted; see RFC 320)
     ("unsafe_no_drop_flag", "1.0.0", None, Active),
 
+    // Allows using the unsafe_destructor_blind_to_params attribute
+    // (Needs an RFC link)
+    ("unsafe_destructor_blind_to_params", "1.3.0", Some(28498), Active),
+
     // Allows the use of custom attributes; RFC 572
     ("custom_attribute", "1.0.0", None, Active),
 
@@ -339,6 +343,11 @@ pub const KNOWN_ATTRIBUTES: &'static [(&'static str, AttributeType, AttributeGat
     ("unsafe_no_drop_flag", Whitelisted, Gated("unsafe_no_drop_flag",
                                                "unsafe_no_drop_flag has unstable semantics \
                                                 and may be removed in the future")),
+    ("unsafe_destructor_blind_to_params",
+     Normal,
+     Gated("unsafe_destructor_blind_to_params",
+           "unsafe_destructor_blind_to_params has unstable semantics \
+            and may be removed in the future")),
     ("unwind", Whitelisted, Gated("unwind_attributes", "#[unwind] is experimental")),
 
     // used in resolve