From ed56c15ceb3e8a6a30c46a4b7a1124d2086b5874 Mon Sep 17 00:00:00 2001 From: Jorge Aparicio Date: Mon, 19 Jan 2015 10:52:11 -0500 Subject: [PATCH] remove `NoSendItem` and `NoSyncItem` --- src/doc/reference.md | 4 ---- src/doc/trpl/unsafe.md | 2 +- src/librustc/middle/lang_items.rs | 2 -- src/librustc/middle/traits/select.rs | 6 +----- 4 files changed, 2 insertions(+), 12 deletions(-) diff --git a/src/doc/reference.md b/src/doc/reference.md index d3af4ab1c74..3cbfad52c05 100644 --- a/src/doc/reference.md +++ b/src/doc/reference.md @@ -2377,10 +2377,6 @@ These types help drive the compiler's analysis : ___Needs filling in___ * `no_copy_bound` : This type does not implement "copy", even if eligible. -* `no_send_bound` - : This type does not implement "send", even if eligible. -* `no_sync_bound` - : This type does not implement "sync", even if eligible. * `eh_personality` : ___Needs filling in___ * `exchange_free` diff --git a/src/doc/trpl/unsafe.md b/src/doc/trpl/unsafe.md index 2a66b4a01f7..3acd1eefe89 100644 --- a/src/doc/trpl/unsafe.md +++ b/src/doc/trpl/unsafe.md @@ -707,7 +707,7 @@ Other features provided by lang items include: various kinds; lang items `send`, `sync` and `copy`. - the marker types and variance indicators found in `std::marker`; lang items `covariant_type`, - `contravariant_lifetime`, `no_sync_bound`, etc. + `contravariant_lifetime`, etc. Lang items are loaded lazily by the compiler; e.g. if one never uses `Box` then there is no need to define functions for `exchange_malloc` diff --git a/src/librustc/middle/lang_items.rs b/src/librustc/middle/lang_items.rs index ff79ace9924..2c0de9d1634 100644 --- a/src/librustc/middle/lang_items.rs +++ b/src/librustc/middle/lang_items.rs @@ -320,9 +320,7 @@ pub fn collect_language_items(krate: &ast::Crate, ContravariantLifetimeItem, "contravariant_lifetime", contravariant_lifetime; InvariantLifetimeItem, "invariant_lifetime", invariant_lifetime; - NoSendItem, "no_send_bound", no_send_bound; NoCopyItem, "no_copy_bound", no_copy_bound; - NoSyncItem, "no_sync_bound", no_sync_bound; ManagedItem, "managed_bound", managed_bound; NonZeroItem, "non_zero", non_zero; diff --git a/src/librustc/middle/traits/select.rs b/src/librustc/middle/traits/select.rs index 62649653a69..e8d82150ade 100644 --- a/src/librustc/middle/traits/select.rs +++ b/src/librustc/middle/traits/select.rs @@ -1554,10 +1554,7 @@ fn nominal<'cx, 'tcx>(this: &mut SelectionContext<'cx, 'tcx>, let tcx = this.tcx(); match bound { ty::BoundSend => { - if - Some(def_id) == tcx.lang_items.no_send_bound() || - Some(def_id) == tcx.lang_items.managed_bound() - { + if Some(def_id) == tcx.lang_items.managed_bound() { return Err(Unimplemented) } } @@ -1568,7 +1565,6 @@ fn nominal<'cx, 'tcx>(this: &mut SelectionContext<'cx, 'tcx>, ty::BoundSync => { if - Some(def_id) == tcx.lang_items.no_sync_bound() || Some(def_id) == tcx.lang_items.managed_bound() || Some(def_id) == tcx.lang_items.unsafe_type() { -- 2.44.0