about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/libcore/intrinsics.rs3
-rw-r--r--src/libcore/marker.rs10
-rw-r--r--src/librustc/middle/lang_items.rs1
-rw-r--r--src/librustc/middle/ty.rs23
-rw-r--r--src/librustc_trans/trans/intrinsic.rs4
-rw-r--r--src/librustc_typeck/check/mod.rs1
-rw-r--r--src/test/compile-fail/typeck-default-trait-impl-negation-sync.rs7
7 files changed, 6 insertions, 43 deletions
diff --git a/src/libcore/intrinsics.rs b/src/libcore/intrinsics.rs
index ac43055a7c4..101381e2c71 100644
--- a/src/libcore/intrinsics.rs
+++ b/src/libcore/intrinsics.rs
@@ -267,9 +267,6 @@ extern "rust-intrinsic" {
     /// `Copy`, then may return `true` or `false`.
     pub fn needs_drop<T>() -> bool;
 
-    /// Returns `true` if a type is managed (will be allocated on the local heap)
-    pub fn owns_managed<T>() -> bool;
-
     /// Calculates the offset from a pointer.
     ///
     /// This is implemented as an intrinsic to avoid converting to and from an
diff --git a/src/libcore/marker.rs b/src/libcore/marker.rs
index e8c7045141d..04839b12ac8 100644
--- a/src/libcore/marker.rs
+++ b/src/libcore/marker.rs
@@ -43,7 +43,6 @@ unsafe impl Send for .. { }
 
 impl<T> !Send for *const T { }
 impl<T> !Send for *mut T { }
-impl !Send for Managed { }
 
 /// Types with a constant size known at compile-time.
 #[stable(feature = "rust1", since = "1.0.0")]
@@ -212,7 +211,6 @@ unsafe impl Sync for .. { }
 
 impl<T> !Sync for *const T { }
 impl<T> !Sync for *mut T { }
-impl !Sync for Managed { }
 
 /// A type which is considered "not POD", meaning that it is not
 /// implicitly copyable. This is typically embedded in other types to
@@ -223,14 +221,6 @@ impl !Sync for Managed { }
 #[derive(Clone, PartialEq, Eq, PartialOrd, Ord)]
 pub struct NoCopy;
 
-/// A type which is considered managed by the GC. This is typically
-/// embedded in other types.
-#[unstable(feature = "core",
-           reason = "likely to change with new variance strategy")]
-#[lang="managed_bound"]
-#[derive(Clone, PartialEq, Eq, PartialOrd, Ord)]
-pub struct Managed;
-
 macro_rules! impls{
     ($t: ident) => (
         impl<T:?Sized> Hash for $t<T> {
diff --git a/src/librustc/middle/lang_items.rs b/src/librustc/middle/lang_items.rs
index c77a43e75cd..c2865e33849 100644
--- a/src/librustc/middle/lang_items.rs
+++ b/src/librustc/middle/lang_items.rs
@@ -334,7 +334,6 @@ lets_do_this! {
     InvariantLifetimeItem,           "invariant_lifetime",      invariant_lifetime;
 
     NoCopyItem,                      "no_copy_bound",           no_copy_bound;
-    ManagedItem,                     "managed_bound",           managed_bound;
 
     NonZeroItem,                     "non_zero",                non_zero;
 
diff --git a/src/librustc/middle/ty.rs b/src/librustc/middle/ty.rs
index 41bd52dc25c..94071ff9190 100644
--- a/src/librustc/middle/ty.rs
+++ b/src/librustc/middle/ty.rs
@@ -3603,12 +3603,10 @@ def_type_content_sets! {
         // Things that are owned by the value (second and third nibbles):
         OwnsOwned                           = 0b0000_0000__0000_0001__0000,
         OwnsDtor                            = 0b0000_0000__0000_0010__0000,
-        OwnsManaged /* see [1] below */     = 0b0000_0000__0000_0100__0000,
         OwnsAll                             = 0b0000_0000__1111_1111__0000,
 
         // Things that are reachable by the value in any way (fourth nibble):
         ReachesBorrowed                     = 0b0000_0010__0000_0000__0000,
-        // ReachesManaged /* see [1] below */  = 0b0000_0100__0000_0000__0000,
         ReachesMutable                      = 0b0000_1000__0000_0000__0000,
         ReachesFfiUnsafe                    = 0b0010_0000__0000_0000__0000,
         ReachesAll                          = 0b0011_1111__0000_0000__0000,
@@ -3619,13 +3617,6 @@ def_type_content_sets! {
         // Things that prevent values from being considered sized
         Nonsized                            = 0b0000_0000__0000_0000__0001,
 
-        // Bits to set when a managed value is encountered
-        //
-        // [1] Do not set the bits TC::OwnsManaged or
-        //     TC::ReachesManaged directly, instead reference
-        //     TC::Managed to set them both at once.
-        Managed                             = 0b0000_0100__0000_0100__0000,
-
         // All bits
         All                                 = 0b1111_1111__1111_1111__1111
     }
@@ -3640,10 +3631,6 @@ impl TypeContents {
         (self.bits & tc.bits) != 0
     }
 
-    pub fn owns_managed(&self) -> bool {
-        self.intersects(TC::OwnsManaged)
-    }
-
     pub fn owns_owned(&self) -> bool {
         self.intersects(TC::OwnsOwned)
     }
@@ -3680,12 +3667,6 @@ impl TypeContents {
             *self & TC::ReachesAll)
     }
 
-    /// Includes only those bits that still apply when indirected through a managed pointer (`@`)
-    pub fn managed_pointer(&self) -> TypeContents {
-        TC::Managed | (
-            *self & TC::ReachesAll)
-    }
-
     /// Includes only those bits that still apply when indirected through an unsafe pointer (`*`)
     pub fn unsafe_pointer(&self) -> TypeContents {
         *self & TC::ReachesAll
@@ -3930,9 +3911,7 @@ pub fn type_contents<'tcx>(cx: &ctxt<'tcx>, ty: Ty<'tcx>) -> TypeContents {
 
     fn apply_lang_items(cx: &ctxt, did: ast::DefId, tc: TypeContents)
                         -> TypeContents {
-        if Some(did) == cx.lang_items.managed_bound() {
-            tc | TC::Managed
-        } else if Some(did) == cx.lang_items.unsafe_cell_type() {
+        if Some(did) == cx.lang_items.unsafe_cell_type() {
             tc | TC::InteriorUnsafe
         } else {
             tc
diff --git a/src/librustc_trans/trans/intrinsic.rs b/src/librustc_trans/trans/intrinsic.rs
index 7188fdebeec..4b1bdd63dd7 100644
--- a/src/librustc_trans/trans/intrinsic.rs
+++ b/src/librustc_trans/trans/intrinsic.rs
@@ -387,10 +387,6 @@ pub fn trans_intrinsic_call<'a, 'blk, 'tcx>(mut bcx: Block<'blk, 'tcx>,
 
             C_bool(ccx, bcx.fcx.type_needs_drop(tp_ty))
         }
-        (_, "owns_managed") => {
-            let tp_ty = *substs.types.get(FnSpace, 0);
-            C_bool(ccx, ty::type_contents(ccx.tcx(), tp_ty).owns_managed())
-        }
         (_, "offset") => {
             let ptr = llargs[0];
             let offset = llargs[1];
diff --git a/src/librustc_typeck/check/mod.rs b/src/librustc_typeck/check/mod.rs
index ad1042c068a..c05c1c6b085 100644
--- a/src/librustc_typeck/check/mod.rs
+++ b/src/librustc_typeck/check/mod.rs
@@ -4944,7 +4944,6 @@ pub fn check_intrinsic_type(ccx: &CrateCtxt, it: &ast::ForeignItem) {
                ty::mk_nil(tcx))
             }
             "needs_drop" => (1, Vec::new(), ccx.tcx.types.bool),
-            "owns_managed" => (1, Vec::new(), ccx.tcx.types.bool),
 
             "type_name" => (1, Vec::new(), ty::mk_str_slice(tcx, tcx.mk_region(ty::ReStatic),
                                                              ast::MutImmutable)),
diff --git a/src/test/compile-fail/typeck-default-trait-impl-negation-sync.rs b/src/test/compile-fail/typeck-default-trait-impl-negation-sync.rs
index d613589e7d7..7c5d1d93b1a 100644
--- a/src/test/compile-fail/typeck-default-trait-impl-negation-sync.rs
+++ b/src/test/compile-fail/typeck-default-trait-impl-negation-sync.rs
@@ -12,7 +12,10 @@
 
 #![feature(optin_builtin_traits)]
 
-use std::marker::Managed;
+struct Managed;
+impl !Send for Managed {}
+impl !Sync for Managed {}
+
 use std::cell::UnsafeCell;
 
 struct MySync {
@@ -46,5 +49,5 @@ fn main() {
     //~^ ERROR the trait `core::marker::Sync` is not implemented for the type `core::cell::UnsafeCell<u8>`
 
     is_sync::<MyTypeManaged>();
-    //~^ ERROR the trait `core::marker::Sync` is not implemented for the type `core::marker::Managed`
+    //~^ ERROR the trait `core::marker::Sync` is not implemented for the type `Managed`
 }