diff options
| author | bors <bors@rust-lang.org> | 2014-03-22 13:01:52 -0700 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2014-03-22 13:01:52 -0700 |
| commit | 7e7a5e3d3eabe0ee46474b0eb701c159a45b490f (patch) | |
| tree | 70ed4399cd98654d6ba75b4251b8478868ab063a /src/doc | |
| parent | 0e6f90eb89021342935de9af2f014fbee5805855 (diff) | |
| parent | a1cb2f5d8c4ce807b27b09344b5ef7d9cd94c04d (diff) | |
| download | rust-7e7a5e3d3eabe0ee46474b0eb701c159a45b490f.tar.gz rust-7e7a5e3d3eabe0ee46474b0eb701c159a45b490f.zip | |
auto merge of #13076 : FlaPer87/rust/remove-freeze, r=alexcrichton
This PR removes the `Freeze` kind and the `NoFreeze` marker completely. Fixes #12577 cc @nikomatsakis r?
Diffstat (limited to 'src/doc')
| -rw-r--r-- | src/doc/rust.md | 6 | ||||
| -rw-r--r-- | src/doc/tutorial.md | 14 |
2 files changed, 6 insertions, 14 deletions
diff --git a/src/doc/rust.md b/src/doc/rust.md index deb26610ada..a61e8081848 100644 --- a/src/doc/rust.md +++ b/src/doc/rust.md @@ -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 diff --git a/src/doc/tutorial.md b/src/doc/tutorial.md index 5d180cdfab5..bfa1a3a2a29 100644 --- a/src/doc/tutorial.md +++ b/src/doc/tutorial.md @@ -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 |
