@@ -17,14 +17,14 @@ This document does not serve as a tutorial introduction to the
17
17
language. Background familiarity with the language is assumed. A separate
18
18
[ tutorial] document is available to help acquire such background familiarity.
19
19
20
- This document also does not serve as a reference to the [ core ] or [ standard ]
20
+ This document also does not serve as a reference to the [ standard ] or [ extra ]
21
21
libraries included in the language distribution. Those libraries are
22
22
documented separately by extracting documentation attributes from their
23
23
source code.
24
24
25
25
[ tutorial ] : tutorial.html
26
- [ core ] : core/index.html
27
26
[ standard ] : std/index.html
27
+ [ extra ] : extra/index.html
28
28
29
29
## Disclaimer
30
30
@@ -441,7 +441,7 @@ expression context, the final namespace qualifier is omitted.
441
441
Two examples of paths with type arguments:
442
442
443
443
~~~~
444
- # use core ::hashmap::HashMap;
444
+ # use std ::hashmap::HashMap;
445
445
# fn f() {
446
446
# fn id<T:Copy>(t: T) -> T { t }
447
447
type t = HashMap<int,~str>; // Type arguments used in a type expression
@@ -768,9 +768,9 @@ Three examples of `extern mod` declarations:
768
768
~~~~~~~~ {.xfail-test}
769
769
extern mod pcre (uuid = "54aba0f8-a7b1-4beb-92f1-4cf625264841");
770
770
771
- extern mod std ; // equivalent to: extern mod std ( name = "std " );
771
+ extern mod extra ; // equivalent to: extern mod extra ( name = "extra " );
772
772
773
- extern mod ruststd (name = "std "); // linking to 'std ' under another name
773
+ extern mod rustextra (name = "extra "); // linking to 'extra ' under another name
774
774
~~~~~~~~
775
775
776
776
##### Use declarations
@@ -802,19 +802,19 @@ Use declarations support a number of convenient shortcuts:
802
802
An example of ` use ` declarations:
803
803
804
804
~~~~
805
- use core ::float::sin;
806
- use core ::str::{slice, contains};
807
- use core ::option::Some;
805
+ use std ::float::sin;
806
+ use std ::str::{slice, contains};
807
+ use std ::option::Some;
808
808
809
809
fn main() {
810
- // Equivalent to 'info!(core ::float::sin(1.0));'
810
+ // Equivalent to 'info!(std ::float::sin(1.0));'
811
811
info!(sin(1.0));
812
812
813
- // Equivalent to 'info!(core ::option::Some(1.0));'
813
+ // Equivalent to 'info!(std ::option::Some(1.0));'
814
814
info!(Some(1.0));
815
815
816
816
// Equivalent to
817
- // 'info!(core ::str::contains(core ::str::slice("foo", 0, 1), "oo"));'
817
+ // 'info!(std ::str::contains(std ::str::slice("foo", 0, 1), "oo"));'
818
818
info!(contains(slice("foo", 0, 1), "oo"));
819
819
}
820
820
~~~~
@@ -1327,7 +1327,7 @@ with the exception that they may not have a body
1327
1327
and are instead terminated by a semicolon.
1328
1328
1329
1329
~~~
1330
- # use core ::libc::{c_char, FILE};
1330
+ # use std ::libc::{c_char, FILE};
1331
1331
# #[nolink]
1332
1332
1333
1333
extern {
@@ -1436,7 +1436,7 @@ Some primitive Rust operations are defined in Rust code,
1436
1436
rather than being implemented directly in C or assembly language.
1437
1437
The definitions of these operations have to be easy for the compiler to find.
1438
1438
The ` lang ` attribute makes it possible to declare these operations.
1439
- For example, the ` str ` module in the Rust core library defines the string equality function:
1439
+ For example, the ` str ` module in the Rust standard library defines the string equality function:
1440
1440
1441
1441
~~~ {.xfail-test}
1442
1442
#[lang="str_eq"]
@@ -1562,7 +1562,7 @@ impl<T: Eq> Eq for Foo<T> {
1562
1562
Supported traits for ` deriving ` are:
1563
1563
1564
1564
* Comparison traits: ` Eq ` , ` TotalEq ` , ` Ord ` , ` TotalOrd ` .
1565
- * Serialization: ` Encodable ` , ` Decodable ` . These require ` std ` .
1565
+ * Serialization: ` Encodable ` , ` Decodable ` . These require ` extra ` .
1566
1566
* ` Clone ` and ` DeepClone ` , to perform (deep) copies.
1567
1567
* ` IterBytes ` , to iterate over the bytes in a data type.
1568
1568
* ` Rand ` , to create a random instance of a data type.
@@ -1885,25 +1885,25 @@ Binary operators expressions are given in terms of
1885
1885
#### Arithmetic operators
1886
1886
1887
1887
Binary arithmetic expressions are syntactic sugar for calls to built-in traits,
1888
- defined in the ` core ::ops` module of the ` core ` library.
1888
+ defined in the ` std ::ops` module of the ` std ` library.
1889
1889
This means that arithmetic operators can be overridden for user-defined types.
1890
1890
The default meaning of the operators on standard types is given here.
1891
1891
1892
1892
` + `
1893
1893
: Addition and vector/string concatenation.
1894
- Calls the ` add ` method on the ` core ::ops::Add` trait.
1894
+ Calls the ` add ` method on the ` std ::ops::Add` trait.
1895
1895
` - `
1896
1896
: Subtraction.
1897
- Calls the ` sub ` method on the ` core ::ops::Sub` trait.
1897
+ Calls the ` sub ` method on the ` std ::ops::Sub` trait.
1898
1898
` * `
1899
1899
: Multiplication.
1900
- Calls the ` mul ` method on the ` core ::ops::Mul` trait.
1900
+ Calls the ` mul ` method on the ` std ::ops::Mul` trait.
1901
1901
` / `
1902
1902
: Quotient.
1903
- Calls the ` div ` method on the ` core ::ops::Div` trait.
1903
+ Calls the ` div ` method on the ` std ::ops::Div` trait.
1904
1904
` % `
1905
1905
: Remainder.
1906
- Calls the ` rem ` method on the ` core ::ops::Rem` trait.
1906
+ Calls the ` rem ` method on the ` std ::ops::Rem` trait.
1907
1907
1908
1908
#### Bitwise operators
1909
1909
@@ -1914,19 +1914,19 @@ The default meaning of the operators on standard types is given here.
1914
1914
1915
1915
` & `
1916
1916
: And.
1917
- Calls the ` bitand ` method of the ` core ::ops::BitAnd` trait.
1917
+ Calls the ` bitand ` method of the ` std ::ops::BitAnd` trait.
1918
1918
` | `
1919
1919
: Inclusive or.
1920
- Calls the ` bitor ` method of the ` core ::ops::BitOr` trait.
1920
+ Calls the ` bitor ` method of the ` std ::ops::BitOr` trait.
1921
1921
` ^ `
1922
1922
: Exclusive or.
1923
- Calls the ` bitxor ` method of the ` core ::ops::BitXor` trait.
1923
+ Calls the ` bitxor ` method of the ` std ::ops::BitXor` trait.
1924
1924
` << `
1925
1925
: Logical left shift.
1926
- Calls the ` shl ` method of the ` core ::ops::Shl` trait.
1926
+ Calls the ` shl ` method of the ` std ::ops::Shl` trait.
1927
1927
` >> `
1928
1928
: Logical right shift.
1929
- Calls the ` shr ` method of the ` core ::ops::Shr` trait.
1929
+ Calls the ` shr ` method of the ` std ::ops::Shr` trait.
1930
1930
1931
1931
#### Lazy boolean operators
1932
1932
@@ -1947,22 +1947,22 @@ The default meaning of the operators on standard types is given here.
1947
1947
1948
1948
` == `
1949
1949
: Equal to.
1950
- Calls the ` eq ` method on the ` core ::cmp::Eq` trait.
1950
+ Calls the ` eq ` method on the ` std ::cmp::Eq` trait.
1951
1951
` != `
1952
1952
: Unequal to.
1953
- Calls the ` ne ` method on the ` core ::cmp::Eq` trait.
1953
+ Calls the ` ne ` method on the ` std ::cmp::Eq` trait.
1954
1954
` < `
1955
1955
: Less than.
1956
- Calls the ` lt ` method on the ` core ::cmp::Ord` trait.
1956
+ Calls the ` lt ` method on the ` std ::cmp::Ord` trait.
1957
1957
` > `
1958
1958
: Greater than.
1959
- Calls the ` gt ` method on the ` core ::cmp::Ord` trait.
1959
+ Calls the ` gt ` method on the ` std ::cmp::Ord` trait.
1960
1960
` <= `
1961
1961
: Less than or equal.
1962
- Calls the ` le ` method on the ` core ::cmp::Ord` trait.
1962
+ Calls the ` le ` method on the ` std ::cmp::Ord` trait.
1963
1963
` >= `
1964
1964
: Greater than or equal.
1965
- Calls the ` ge ` method on the ` core ::cmp::Ord` trait.
1965
+ Calls the ` ge ` method on the ` std ::cmp::Ord` trait.
1966
1966
1967
1967
1968
1968
#### Type cast expressions
@@ -2121,11 +2121,11 @@ then the expression completes.
2121
2121
Some examples of call expressions:
2122
2122
2123
2123
~~~~
2124
- # use core ::from_str::FromStr::from_str ;
2124
+ # use std ::from_str::FromStr;
2125
2125
# fn add(x: int, y: int) -> int { 0 }
2126
2126
2127
2127
let x: int = add(1, 2);
2128
- let pi = from_str::<f32>("3.14");
2128
+ let pi = FromStr:: from_str::<f32>("3.14");
2129
2129
~~~~
2130
2130
2131
2131
### Lambda expressions
@@ -3168,7 +3168,7 @@ execute, after which it is *descheduled* at a loop-edge or similar
3168
3168
preemption point, and another task within is scheduled, pseudo-randomly.
3169
3169
3170
3170
An executing task can yield control at any time, by making a library call to
3171
- ` core ::task::yield` , which deschedules it immediately. Entering any other
3171
+ ` std ::task::yield` , which deschedules it immediately. Entering any other
3172
3172
non-executing state (blocked, dead) similarly deschedules the task.
3173
3173
3174
3174
@@ -3181,7 +3181,7 @@ run-time. It is smaller and simpler than many modern language runtimes. It is
3181
3181
tightly integrated into the language's execution model of memory, tasks,
3182
3182
communication and logging.
3183
3183
3184
- > ** Note:** The runtime library will merge with the ` core ` library in future versions of Rust.
3184
+ > ** Note:** The runtime library will merge with the ` std ` library in future versions of Rust.
3185
3185
3186
3186
### Memory allocation
3187
3187
0 commit comments