diff --git a/doc/tutorial/ffi.md b/doc/tutorial/ffi.md index 797589c3599..9b42a3dd601 100644 --- a/doc/tutorial/ffi.md +++ b/doc/tutorial/ffi.md @@ -1,6 +1,6 @@ # Interacting with foreign code -On of Rust's aims, as a system programming language, is to +One of Rust's aims, as a system programming language, is to interoperate well with C code. We'll start with an example. It's a bit bigger than usual, and diff --git a/doc/tutorial/func.md b/doc/tutorial/func.md index a8bfacedb0f..cf6c4b16cca 100644 --- a/doc/tutorial/func.md +++ b/doc/tutorial/func.md @@ -61,6 +61,8 @@ stored in data structures or returned. A block with no arguments is written `{|| body(); }`—you can not leave off the pipes. +FIXME mention bind + ## Iteration Functions taking blocks provide a good way to define non-trivial diff --git a/doc/tutorial/mod.md b/doc/tutorial/mod.md index 50f7afb765a..24e498bcdb3 100644 --- a/doc/tutorial/mod.md +++ b/doc/tutorial/mod.md @@ -1,7 +1,7 @@ # Modules and crates -The Rust namespace is divided in modules. Each source file starts with -its own, empty module. +The Rust namespace is divided into modules. Each source file starts +with its own, empty module. ## Local modules @@ -153,7 +153,7 @@ restricted with `export` directives at the top of the module or file. This defines a rock-solid encryption algorithm. Code outside of the module can refer to the `enc::encrypt` and `enc::decrypt` identifiers -just fine, but it does not have access to `enc::syper_secret_number`. +just fine, but it does not have access to `enc::super_secret_number`. ## Namespaces @@ -185,10 +185,10 @@ context. Identifiers can shadow each others. In this program, `x` is of type `int`: - type x = str; + type t = str; fn main() { - type x = int; - let x: int; + type t = int; + let x: t; } An `import` directive will only import into the namespaces for which diff --git a/doc/tutorial/syntax.md b/doc/tutorial/syntax.md index d2a28a17ea3..8182cc11932 100644 --- a/doc/tutorial/syntax.md +++ b/doc/tutorial/syntax.md @@ -35,7 +35,7 @@ like `if` and `while` are available: ## Expression syntax -Though it isn't apparent in most everyday code, there is a fundamental +Though it isn't apparent in all code, there is a fundamental difference between Rust's syntax and the predecessors in this family of languages. A lot of thing that are statements in C are expressions in Rust. This allows for useless things like this (which passes