about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorManish Goregaokar <manishsmail@gmail.com>2015-03-09 16:30:37 +0530
committerManish Goregaokar <manishsmail@gmail.com>2015-03-09 17:59:20 +0530
commit4733190c35a01ac33e82892b4dffa2c052c4fe9c (patch)
treebcbc8fa7d7700a5915ea29a5290eaba4177362c6 /src
parent811c575b3c08f839c1cf86a7e9f912f6dff637d4 (diff)
parent9653a521b51611d9af79b480dbc3db6a49e7f1a7 (diff)
downloadrust-4733190c35a01ac33e82892b4dffa2c052c4fe9c.tar.gz
rust-4733190c35a01ac33e82892b4dffa2c052c4fe9c.zip
Rollup merge of #23183 - steveklabnik:gh22572, r=Manishearth
 They're opt-in now.

Fixes #22572
Diffstat (limited to 'src')
-rw-r--r--src/libcore/cell.rs3
-rw-r--r--src/libcore/marker.rs11
2 files changed, 3 insertions, 11 deletions
diff --git a/src/libcore/cell.rs b/src/libcore/cell.rs
index b8a22c30f9e..4f77a20c7ca 100644
--- a/src/libcore/cell.rs
+++ b/src/libcore/cell.rs
@@ -631,9 +631,6 @@ impl<'b, T> DerefMut for RefMut<'b, T> {
 ///
 /// Types like `Cell<T>` and `RefCell<T>` use this type to wrap their internal data.
 ///
-/// `UnsafeCell<T>` doesn't opt-out from any marker traits, instead, types with an `UnsafeCell<T>`
-/// interior are expected to opt-out from those traits themselves.
-///
 /// # Examples
 ///
 /// ```
diff --git a/src/libcore/marker.rs b/src/libcore/marker.rs
index 868a671b956..26c43a0abd0 100644
--- a/src/libcore/marker.rs
+++ b/src/libcore/marker.rs
@@ -193,14 +193,9 @@ pub trait Copy : MarkerTrait {
 /// the `sync` crate do ensure that any mutation cannot cause data
 /// races.  Hence these types are `Sync`.
 ///
-/// Users writing their own types with interior mutability (or anything
-/// else that is not thread-safe) should use the `NoSync` marker type
-/// (from `std::marker`) to ensure that the compiler doesn't
-/// consider the user-defined type to be `Sync`.  Any types with
-/// interior mutability must also use the `std::cell::UnsafeCell` wrapper
-/// around the value(s) which can be mutated when behind a `&`
-/// reference; not doing this is undefined behaviour (for example,
-/// `transmute`-ing from `&T` to `&mut T` is illegal).
+/// Any types with interior mutability must also use the `std::cell::UnsafeCell` wrapper around the
+/// value(s) which can be mutated when behind a `&` reference; not doing this is undefined
+/// behaviour (for example, `transmute`-ing from `&T` to `&mut T` is illegal).
 #[stable(feature = "rust1", since = "1.0.0")]
 #[lang="sync"]
 #[rustc_on_unimplemented = "`{Self}` cannot be shared between threads safely"]