about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/libcore/marker.rs11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/libcore/marker.rs b/src/libcore/marker.rs
index 2d14b31748e..bf9e6bccc71 100644
--- a/src/libcore/marker.rs
+++ b/src/libcore/marker.rs
@@ -311,16 +311,17 @@ impl<T: ?Sized> Clone for ContravariantType<T> {
 ///
 /// # Example
 ///
-/// The Cell type is an example which uses unsafe code to achieve
-/// "interior" mutability:
+/// The Cell type is an example of an `InvariantType` which uses unsafe
+/// code to achieve "interior" mutability:
 ///
 /// ```
 /// struct Cell<T> { value: T }
 /// ```
 ///
-/// The type system would infer that `value` is only read here and
-/// never written, but in fact `Cell` uses unsafe code to achieve
-/// interior mutability.
+/// The type system would infer that `value` is only read here
+/// and never written, but in fact `Cell` uses unsafe code to achieve
+/// interior mutability. In order to get correct behavior, the
+/// `InvariantType` marker must be applied.
 #[unstable(feature = "core",
            reason = "likely to change with new variance strategy")]
 #[lang="invariant_type"]