]> git.lizzy.rs Git - rust.git/commitdiff
doc: Remove Freeze / NoFreeze from docs
authorFlavio Percoco <flaper87@gmail.com>
Sat, 22 Mar 2014 13:42:32 +0000 (14:42 +0100)
committerFlavio Percoco <flaper87@gmail.com>
Sat, 22 Mar 2014 14:47:34 +0000 (15:47 +0100)
src/doc/rust.md
src/doc/tutorial.md
src/librustc/middle/kind.rs
src/librustc/middle/typeck/collect.rs
src/librustdoc/html/render.rs
src/libsyntax/ast.rs

index deb26610ada678fe4f9614e07a0b9a5121cf4cfa..a61e80818487acaa771a2ec17e7cc2efd9ecd703 100644 (file)
@@ -1019,7 +1019,7 @@ never invoking this behaviour or exposing an API making it possible for it to oc
 
 * Data races
 * Dereferencing a null/dangling raw pointer
-* Mutating an immutable value/reference, if it is not marked as non-`Freeze`
+* Mutating an immutable value/reference
 * Reads of [undef](http://llvm.org/docs/LangRef.html#undefined-values) (uninitialized) memory
 * Breaking the [pointer aliasing rules](http://llvm.org/docs/LangRef.html#pointer-aliasing-rules)
   with raw pointers (a subset of the rules used by C)
@@ -3434,10 +3434,6 @@ call to the method `make_string`.
 Types in Rust are categorized into kinds, based on various properties of the components of the type.
 The kinds are:
 
-`Freeze`
-  : Types of this kind are deeply immutable;
-    they contain no mutable memory locations
-    directly or indirectly via pointers.
 `Send`
   : Types of this kind can be safely sent between tasks.
     This kind includes scalars, owning pointers, owned closures, and
index 3c0439b7cd16507a44f8716ae6a79dea3f263989..b854841487d6f8ec92afcea8a939591299a6c29a 100644 (file)
@@ -2099,10 +2099,6 @@ unless they contain managed boxes, managed closures, or references.
 These are types that are safe to be used across several threads with access to
 a `&T` pointer. `MutexArc` is an example of a *sharable* type with internal mutable data.
 
-* `Freeze` - Constant (immutable) types.
-These are types that do not contain anything intrinsically mutable.
-Intrinsically mutable values include `Cell` in the standard library.
-
 * `'static` - Non-borrowed types.
 These are types that do not contain any data whose lifetime is bound to
 a particular stack frame. These are types that do not contain any
@@ -2152,7 +2148,7 @@ We say that the `Printable` trait _provides_ a `print` method with the
 given signature.  This means that we can call `print` on an argument
 of any type that implements the `Printable` trait.
 
-Rust's built-in `Send` and `Freeze` types are examples of traits that
+Rust's built-in `Send` and `Share` types are examples of traits that
 don't provide any methods.
 
 Traits may be implemented for specific types with [impls]. An impl for
@@ -2444,15 +2440,15 @@ Consequently, the trait objects themselves automatically fulfill their
 respective kind bounds. However, this default behavior can be overridden by
 specifying a list of bounds on the trait type, for example, by writing `~Trait:`
 (which indicates that the contents of the owned trait need not fulfill any
-bounds), or by writing `~Trait:Send+Freeze`, which indicates that in addition
-to fulfilling `Send`, contents must also fulfill `Freeze`, and as a consequence,
-the trait itself fulfills `Freeze`.
+bounds), or by writing `~Trait:Send+Share`, which indicates that in addition
+to fulfilling `Send`, contents must also fulfill `Share`, and as a consequence,
+the trait itself fulfills `Share`.
 
 * `~Trait:Send` is equivalent to `~Trait`.
 * `&Trait:` is equivalent to `&Trait`.
 
 Builtin kind bounds can also be specified on closure types in the same way (for
-example, by writing `fn:Freeze()`), and the default behaviours are the same as
+example, by writing `fn:Send()`), and the default behaviours are the same as
 for traits of the same storage class.
 
 ## Trait inheritance
index 9d8f35eb9806508e49cea0612d7dbc91653bf7de..ee5d896a1c024ee2af5907061d17091948df7adf 100644 (file)
 // kind is noncopyable. The noncopyable kind can be extended with any number
 // of the following attributes.
 //
-//  send: Things that can be sent on channels or included in spawned closures.
-//  freeze: Things thare are deeply immutable. They are guaranteed never to
-//    change, and can be safely shared without copying between tasks.
+//  Send: Things that can be sent on channels or included in spawned closures. It
+//  includes scalar types as well as classes and unique types containing only
+//  sendable types.
 //  'static: Things that do not contain references.
 //
-// Send includes scalar types as well as classes and unique types containing
-// only sendable types.
-//
-// Freeze include scalar types, things without non-const fields, and pointers
-// to freezable things.
-//
 // This pass ensures that type parameters are only instantiated with types
 // whose kinds are equal or less general than the way the type parameter was
-// annotated (with the `Send` or `Freeze` bound).
+// annotated (with the `Send` bound).
 //
 // It also verifies that noncopyable kinds are not copied. Sendability is not
 // applied, since none of our language primitives send. Instead, the sending
index 4eeae31d0a49cbb558eefb8d21829d0d6561f1a4..6c6d6a2867cedb05d128eca9cdc1acbaf59ab01e 100644 (file)
@@ -1027,8 +1027,7 @@ fn compute_bounds(
          * Translate the AST's notion of ty param bounds (which are an
          * enum consisting of a newtyped Ty or a region) to ty's
          * notion of ty param bounds, which can either be user-defined
-         * traits, or one of the two built-in traits (formerly known
-         * as kinds): Freeze and Send.
+         * traits, or the built-in trait (formerly known as kind): Send.
          */
 
         let mut param_bounds = ty::ParamBounds {
index 4079fafb3683789867cc9e57ca919956db53ed56..0e9025303d00aa80ed96043a93c79e24f2640aa0 100644 (file)
@@ -116,8 +116,8 @@ pub enum Implementor {
 ///
 /// This structure purposefully does not implement `Clone` because it's intended
 /// to be a fairly large and expensive structure to clone. Instead this adheres
-/// to both `Send` and `Freeze` so it may be stored in a `Arc` instance and
-/// shared among the various rendering tasks.
+/// to `Send` so it may be stored in a `Arc` instance and shared among the various
+/// rendering tasks.
 pub struct Cache {
     /// Mapping of typaram ids to the name of the type parameter. This is used
     /// when pretty-printing a type (so pretty printing doesn't have to
index 41038705d4d7e36cbfce0b210887c9dbf58d0ebe..f2a256165e2973d9fc53ed07acbf2876a90b5134 100644 (file)
@@ -169,7 +169,7 @@ pub struct DefId {
 // The AST represents all type param bounds as types.
 // typeck::collect::compute_bounds matches these against
 // the "special" built-in traits (see middle::lang_items) and
-// detects Copy, Send, Send, and Freeze.
+// detects Copy, Send and Share.
 #[deriving(Clone, Eq, Encodable, Decodable, Hash)]
 pub enum TyParamBound {
     TraitTyParamBound(TraitRef),