Skip to content

Commit a1cb2f5

Browse files
committed
doc: Remove Freeze / NoFreeze from docs
1 parent 90e9d8e commit a1cb2f5

File tree

6 files changed

+14
-29
lines changed

6 files changed

+14
-29
lines changed

src/doc/rust.md

+1-5
Original file line numberDiff line numberDiff line change
@@ -1019,7 +1019,7 @@ never invoking this behaviour or exposing an API making it possible for it to oc
10191019

10201020
* Data races
10211021
* Dereferencing a null/dangling raw pointer
1022-
* Mutating an immutable value/reference, if it is not marked as non-`Freeze`
1022+
* Mutating an immutable value/reference
10231023
* Reads of [undef](http://llvm.org/docs/LangRef.html#undefined-values) (uninitialized) memory
10241024
* Breaking the [pointer aliasing rules](http://llvm.org/docs/LangRef.html#pointer-aliasing-rules)
10251025
with raw pointers (a subset of the rules used by C)
@@ -3434,10 +3434,6 @@ call to the method `make_string`.
34343434
Types in Rust are categorized into kinds, based on various properties of the components of the type.
34353435
The kinds are:
34363436

3437-
`Freeze`
3438-
: Types of this kind are deeply immutable;
3439-
they contain no mutable memory locations
3440-
directly or indirectly via pointers.
34413437
`Send`
34423438
: Types of this kind can be safely sent between tasks.
34433439
This kind includes scalars, owning pointers, owned closures, and

src/doc/tutorial.md

+5-9
Original file line numberDiff line numberDiff line change
@@ -2099,10 +2099,6 @@ unless they contain managed boxes, managed closures, or references.
20992099
These are types that are safe to be used across several threads with access to
21002100
a `&T` pointer. `MutexArc` is an example of a *sharable* type with internal mutable data.
21012101
2102-
* `Freeze` - Constant (immutable) types.
2103-
These are types that do not contain anything intrinsically mutable.
2104-
Intrinsically mutable values include `Cell` in the standard library.
2105-
21062102
* `'static` - Non-borrowed types.
21072103
These are types that do not contain any data whose lifetime is bound to
21082104
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
21522148
given signature. This means that we can call `print` on an argument
21532149
of any type that implements the `Printable` trait.
21542150
2155-
Rust's built-in `Send` and `Freeze` types are examples of traits that
2151+
Rust's built-in `Send` and `Share` types are examples of traits that
21562152
don't provide any methods.
21572153
21582154
Traits may be implemented for specific types with [impls]. An impl for
@@ -2444,15 +2440,15 @@ Consequently, the trait objects themselves automatically fulfill their
24442440
respective kind bounds. However, this default behavior can be overridden by
24452441
specifying a list of bounds on the trait type, for example, by writing `~Trait:`
24462442
(which indicates that the contents of the owned trait need not fulfill any
2447-
bounds), or by writing `~Trait:Send+Freeze`, which indicates that in addition
2448-
to fulfilling `Send`, contents must also fulfill `Freeze`, and as a consequence,
2449-
the trait itself fulfills `Freeze`.
2443+
bounds), or by writing `~Trait:Send+Share`, which indicates that in addition
2444+
to fulfilling `Send`, contents must also fulfill `Share`, and as a consequence,
2445+
the trait itself fulfills `Share`.
24502446
24512447
* `~Trait:Send` is equivalent to `~Trait`.
24522448
* `&Trait:` is equivalent to `&Trait`.
24532449
24542450
Builtin kind bounds can also be specified on closure types in the same way (for
2455-
example, by writing `fn:Freeze()`), and the default behaviours are the same as
2451+
example, by writing `fn:Send()`), and the default behaviours are the same as
24562452
for traits of the same storage class.
24572453
24582454
## Trait inheritance

src/librustc/middle/kind.rs

+4-10
Original file line numberDiff line numberDiff line change
@@ -30,20 +30,14 @@ use syntax::visit::Visitor;
3030
// kind is noncopyable. The noncopyable kind can be extended with any number
3131
// of the following attributes.
3232
//
33-
// send: Things that can be sent on channels or included in spawned closures.
34-
// freeze: Things thare are deeply immutable. They are guaranteed never to
35-
// change, and can be safely shared without copying between tasks.
33+
// Send: Things that can be sent on channels or included in spawned closures. It
34+
// includes scalar types as well as classes and unique types containing only
35+
// sendable types.
3636
// 'static: Things that do not contain references.
3737
//
38-
// Send includes scalar types as well as classes and unique types containing
39-
// only sendable types.
40-
//
41-
// Freeze include scalar types, things without non-const fields, and pointers
42-
// to freezable things.
43-
//
4438
// This pass ensures that type parameters are only instantiated with types
4539
// whose kinds are equal or less general than the way the type parameter was
46-
// annotated (with the `Send` or `Freeze` bound).
40+
// annotated (with the `Send` bound).
4741
//
4842
// It also verifies that noncopyable kinds are not copied. Sendability is not
4943
// applied, since none of our language primitives send. Instead, the sending

src/librustc/middle/typeck/collect.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -1027,8 +1027,7 @@ pub fn ty_generics(ccx: &CrateCtxt,
10271027
* Translate the AST's notion of ty param bounds (which are an
10281028
* enum consisting of a newtyped Ty or a region) to ty's
10291029
* notion of ty param bounds, which can either be user-defined
1030-
* traits, or one of the two built-in traits (formerly known
1031-
* as kinds): Freeze and Send.
1030+
* traits, or the built-in trait (formerly known as kind): Send.
10321031
*/
10331032

10341033
let mut param_bounds = ty::ParamBounds {

src/librustdoc/html/render.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,8 @@ pub enum Implementor {
116116
///
117117
/// This structure purposefully does not implement `Clone` because it's intended
118118
/// to be a fairly large and expensive structure to clone. Instead this adheres
119-
/// to both `Send` and `Freeze` so it may be stored in a `Arc` instance and
120-
/// shared among the various rendering tasks.
119+
/// to `Send` so it may be stored in a `Arc` instance and shared among the various
120+
/// rendering tasks.
121121
pub struct Cache {
122122
/// Mapping of typaram ids to the name of the type parameter. This is used
123123
/// when pretty-printing a type (so pretty printing doesn't have to

src/libsyntax/ast.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ pub static DUMMY_NODE_ID: NodeId = -1;
169169
// The AST represents all type param bounds as types.
170170
// typeck::collect::compute_bounds matches these against
171171
// the "special" built-in traits (see middle::lang_items) and
172-
// detects Copy, Send, Send, and Freeze.
172+
// detects Copy, Send and Share.
173173
#[deriving(Clone, Eq, Encodable, Decodable, Hash)]
174174
pub enum TyParamBound {
175175
TraitTyParamBound(TraitRef),

0 commit comments

Comments
 (0)