]> git.lizzy.rs Git - rust.git/blobdiff - src/doc/rust.md
auto merge of #17432 : nick29581/rust/contrib, r=brson
[rust.git] / src / doc / rust.md
index 2ef595a06524e99aacb2bf11a3d53b9a9dd46216..2ffe22cba7553b00660beec8f188860c82fc4e02 100644 (file)
@@ -13,16 +13,16 @@ provides three kinds of material:
   - Appendix chapters providing rationale and references to languages that
     influenced the design.
 
-This document does not serve as a tutorial introduction to the
+This document does not serve as an introduction to the
 language. Background familiarity with the language is assumed. A separate
-[tutorial] document is available to help acquire such background familiarity.
+[guide] is available to help acquire such background familiarity.
 
 This document also does not serve as a reference to the [standard]
 library included in the language distribution. Those libraries are
 documented separately by extracting documentation attributes from their
 source code.
 
-[tutorial]: tutorial.html
+[guide]: guide.html
 [standard]: std/index.html
 
 ## Disclaimer
@@ -2557,6 +2557,8 @@ The currently implemented features of the reference compiler are:
 
 * `tuple_indexing` - Allows use of tuple indexing (expressions like `expr.0`)
 
+* `associated_types` - Allows type aliases in traits. Experimental.
+
 If a feature is promoted to a language feature, then all existing programs will
 start to receive compilation warnings about #[feature] directives which enabled
 the new feature (because the directive is no longer necessary). However, if
@@ -3698,7 +3700,7 @@ There are two varieties of pointer in Rust:
     they exist to support interoperability with foreign code,
     and writing performance-critical or low-level functions.
 
-The standard library contains addtional 'smart pointer' types beyond references
+The standard library contains additional 'smart pointer' types beyond references
 and raw pointers.
 
 ### Function types
@@ -3831,8 +3833,9 @@ fn map<A: Clone, B: Clone>(f: |A| -> B, xs: &[A]) -> Vec<B> {
        return vec![];
     }
     let first: B = f(xs[0].clone());
-    let rest: Vec<B> = map(f, xs.slice(1, xs.len()));
-    return vec![first].append(rest.as_slice());
+    let mut rest: Vec<B> = map(f, xs.slice(1, xs.len()));
+    rest.insert(0, first);
+    return rest;
 }
 ~~~~
 
@@ -4175,7 +4178,7 @@ communication facilities.
 The Rust compiler supports various methods to link crates together both
 statically and dynamically. This section will explore the various methods to
 link Rust crates together, and more information about native libraries can be
-found in the [ffi tutorial][ffi].
+found in the [ffi guide][ffi].
 
 In one session of compilation, the compiler can generate multiple artifacts
 through the usage of either command line flags or the `crate_type` attribute.