I forgot Rustdoc renders markdown files strangely
This commit is contained in:
Steve Klabnik 2015-12-14 16:47:28 -05:00
parent 3d2370d2c9
commit da54953597
24 changed files with 24 additions and 24 deletions

View File

@ -1,4 +1,4 @@
% Associated Types
# Associated Types
Associated types are a powerful part of Rusts type system. Theyre related to
the idea of a type family, in other words, grouping multiple types together. That

View File

@ -1,4 +1,4 @@
% Closures
# Closures
Sometimes it is useful to wrap up a function and _free variables_ for better
clarity and reuse. The free variables that can be used come from the

View File

@ -1,4 +1,4 @@
% Conditional Compilation
# Conditional Compilation
Rust has a special attribute, `#[cfg]`, which allows you to compile code
based on a flag passed to the compiler. It has two forms:

View File

@ -1,4 +1,4 @@
% Crates and Modules
# Crates and Modules
When a project starts getting large, its considered good software
engineering practice to split it up into a bunch of smaller pieces, and then

View File

@ -1,4 +1,4 @@
% Enums
# Enums
An `enum` in Rust is a type that represents data that is one of
several possible variants. Each variant in the `enum` can optionally

View File

@ -1,4 +1,4 @@
% Functions
# Functions
Every Rust program has at least one function, the `main` function:

View File

@ -1,4 +1,4 @@
% if
# if
Rusts take on `if` is not particularly complex, but its much more like the
`if` youll find in a dynamically typed language than in a more traditional

View File

@ -1,4 +1,4 @@
% Iterators
# Iterators
Let's talk about loops.

View File

@ -1,4 +1,4 @@
% Lifetimes
# Lifetimes
This guide is three of three presenting Rusts ownership system. This is one of
Rusts most unique and compelling features, with which Rust developers should

View File

@ -1,4 +1,4 @@
% Loops
# Loops
Rust currently provides three approaches to performing some kind of iterative activity. They are: `loop`, `while` and `for`. Each approach has its own set of uses.

View File

@ -1,4 +1,4 @@
% Macros
# Macros
By now youve learned about many of the tools Rust provides for abstracting and
reusing code. These units of code reuse have a rich semantic structure. For

View File

@ -1,4 +1,4 @@
% Ownership
# Ownership
This guide is one of three presenting Rusts ownership system. This is one of
Rusts most unique and compelling features, with which Rust developers should

View File

@ -1,4 +1,4 @@
% Primitive Types
# Primitive Types
The Rust language has a number of types that are considered primitive. This
means that theyre built-in to the language. Rust is structured in such a way

View File

@ -1,4 +1,4 @@
% Raw Pointers
# Raw Pointers
Rust has a number of different smart pointer types in its standard library, but
there are two types that are extra-special. Much of Rusts safety comes from

View File

@ -1,4 +1,4 @@
% References and Borrowing
# References and Borrowing
This guide is two of three presenting Rusts ownership system. This is one of
Rusts most unique and compelling features, with which Rust developers should

View File

@ -1,4 +1,4 @@
% Structs
# Structs
`struct`s are a way of creating more complex data types. For example, if we were
doing calculations involving coordinates in 2D space, we would need both an `x`

View File

@ -1,4 +1,4 @@
% Testing
# Testing
> Program testing can be a very effective way to show the presence of bugs, but
> it is hopelessly inadequate for showing their absence.

View File

@ -1,4 +1,4 @@
% Trait Objects
# Trait Objects
When code involves polymorphism, there needs to be a mechanism to determine
which specific version is actually run. This is called dispatch. There are

View File

@ -1,4 +1,4 @@
% Traits
# Traits
A trait is a language feature that tells the Rust compiler about
functionality a type must provide.

View File

@ -1,4 +1,4 @@
% Universal Function Call Syntax
# Universal Function Call Syntax
Sometimes, functions can have the same names. Consider this code:

View File

@ -1,4 +1,4 @@
% Unsafe
# Unsafe
Rusts main draw is its powerful static guarantees about behavior. But safety
checks are conservative by nature: there are some programs that are actually

View File

@ -1,4 +1,4 @@
% Rust Inside Other Languages
# Using Rust From Other Languages
For our third project, were going to choose something that shows off one of
Rusts greatest strengths: a lack of a substantial runtime.

View File

@ -1,4 +1,4 @@
% Variable Bindings
# Variable Bindings
Virtually every non-'Hello World Rust program uses *variable bindings*. They
bind some value to a name, so it can be used later. `let` is

View File

@ -1,4 +1,4 @@
% Vectors
# Vectors
A vector is a dynamic or growable array, implemented as the standard
library type [`Vec<T>`][vec]. The `T` means that we can have vectors