removed weird example
This commit is contained in:
parent
715f9a5e8d
commit
b6544fd352
1 changed files with 0 additions and 13 deletions
|
|
@ -308,19 +308,6 @@ impl<T: ?Sized> Clone for ContravariantType<T> {
|
|||
///
|
||||
/// For more information about variance, refer to this Wikipedia
|
||||
/// article <http://en.wikipedia.org/wiki/Variance_%28computer_science%29>.
|
||||
///
|
||||
/// # Example
|
||||
///
|
||||
/// The Cell type is an example 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.
|
||||
#[unstable(feature = "core",
|
||||
reason = "likely to change with new variance strategy")]
|
||||
#[lang="invariant_type"]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue