From da5495359756d41a4a32a1fb60126161d1274ab5 Mon Sep 17 00:00:00 2001 From: Steve Klabnik Date: Mon, 14 Dec 2015 16:47:28 -0500 Subject: [PATCH] % -> # I forgot Rustdoc renders markdown files strangely --- src/associated-types.md | 2 +- src/closures.md | 2 +- src/conditional-compilation.md | 2 +- src/crates-and-modules.md | 2 +- src/enums.md | 2 +- src/functions.md | 2 +- src/if.md | 2 +- src/iterators.md | 2 +- src/lifetimes.md | 2 +- src/loops.md | 2 +- src/macros.md | 2 +- src/ownership.md | 2 +- src/primitive-types.md | 2 +- src/raw-pointers.md | 2 +- src/references-and-borrowing.md | 2 +- src/structs.md | 2 +- src/testing.md | 2 +- src/trait-objects.md | 2 +- src/traits.md | 2 +- src/ufcs.md | 2 +- src/unsafe-rust.md | 2 +- src/using-rust-from-other-languages.md | 2 +- src/variable-bindings.md | 2 +- src/vectors.md | 2 +- 24 files changed, 24 insertions(+), 24 deletions(-) diff --git a/src/associated-types.md b/src/associated-types.md index fe4f27b9d..8f692c38d 100644 --- a/src/associated-types.md +++ b/src/associated-types.md @@ -1,4 +1,4 @@ -% Associated Types +# Associated Types Associated types are a powerful part of Rust’s type system. They’re related to the idea of a ‘type family’, in other words, grouping multiple types together. That diff --git a/src/closures.md b/src/closures.md index 7d4452a4c..ec78cb635 100644 --- a/src/closures.md +++ b/src/closures.md @@ -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 diff --git a/src/conditional-compilation.md b/src/conditional-compilation.md index a6ff75db8..55bea273c 100644 --- a/src/conditional-compilation.md +++ b/src/conditional-compilation.md @@ -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: diff --git a/src/crates-and-modules.md b/src/crates-and-modules.md index 4a4648c7b..6262066ef 100644 --- a/src/crates-and-modules.md +++ b/src/crates-and-modules.md @@ -1,4 +1,4 @@ -% Crates and Modules +# Crates and Modules When a project starts getting large, it’s considered good software engineering practice to split it up into a bunch of smaller pieces, and then diff --git a/src/enums.md b/src/enums.md index e17d3f762..ccd0392e9 100644 --- a/src/enums.md +++ b/src/enums.md @@ -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 diff --git a/src/functions.md b/src/functions.md index 84cea5dab..6fb060081 100644 --- a/src/functions.md +++ b/src/functions.md @@ -1,4 +1,4 @@ -% Functions +# Functions Every Rust program has at least one function, the `main` function: diff --git a/src/if.md b/src/if.md index a532dabf8..a59e7b051 100644 --- a/src/if.md +++ b/src/if.md @@ -1,4 +1,4 @@ -% if +# if Rust’s take on `if` is not particularly complex, but it’s much more like the `if` you’ll find in a dynamically typed language than in a more traditional diff --git a/src/iterators.md b/src/iterators.md index c444f9f2f..4a8779e93 100644 --- a/src/iterators.md +++ b/src/iterators.md @@ -1,4 +1,4 @@ -% Iterators +# Iterators Let's talk about loops. diff --git a/src/lifetimes.md b/src/lifetimes.md index 68bbd0c98..c9b6fc3ce 100644 --- a/src/lifetimes.md +++ b/src/lifetimes.md @@ -1,4 +1,4 @@ -% Lifetimes +# Lifetimes This guide is three of three presenting Rust’s ownership system. This is one of Rust’s most unique and compelling features, with which Rust developers should diff --git a/src/loops.md b/src/loops.md index 68bb49d2c..784a6baee 100644 --- a/src/loops.md +++ b/src/loops.md @@ -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. diff --git a/src/macros.md b/src/macros.md index f7f27858c..2b802aeff 100644 --- a/src/macros.md +++ b/src/macros.md @@ -1,4 +1,4 @@ -% Macros +# Macros By now you’ve learned about many of the tools Rust provides for abstracting and reusing code. These units of code reuse have a rich semantic structure. For diff --git a/src/ownership.md b/src/ownership.md index 17b263ef0..a15a67052 100644 --- a/src/ownership.md +++ b/src/ownership.md @@ -1,4 +1,4 @@ -% Ownership +# Ownership This guide is one of three presenting Rust’s ownership system. This is one of Rust’s most unique and compelling features, with which Rust developers should diff --git a/src/primitive-types.md b/src/primitive-types.md index a8c7a7d41..db1f522be 100644 --- a/src/primitive-types.md +++ b/src/primitive-types.md @@ -1,4 +1,4 @@ -% Primitive Types +# Primitive Types The Rust language has a number of types that are considered ‘primitive’. This means that they’re built-in to the language. Rust is structured in such a way diff --git a/src/raw-pointers.md b/src/raw-pointers.md index 679f5489e..fe32b8a11 100644 --- a/src/raw-pointers.md +++ b/src/raw-pointers.md @@ -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 Rust’s safety comes from diff --git a/src/references-and-borrowing.md b/src/references-and-borrowing.md index d8758e0c6..e4d8553f1 100644 --- a/src/references-and-borrowing.md +++ b/src/references-and-borrowing.md @@ -1,4 +1,4 @@ -% References and Borrowing +# References and Borrowing This guide is two of three presenting Rust’s ownership system. This is one of Rust’s most unique and compelling features, with which Rust developers should diff --git a/src/structs.md b/src/structs.md index 1d70ee278..96bef141a 100644 --- a/src/structs.md +++ b/src/structs.md @@ -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` diff --git a/src/testing.md b/src/testing.md index 32f0d689e..dc8d2347f 100644 --- a/src/testing.md +++ b/src/testing.md @@ -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. diff --git a/src/trait-objects.md b/src/trait-objects.md index 8127b0898..3af700238 100644 --- a/src/trait-objects.md +++ b/src/trait-objects.md @@ -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 diff --git a/src/traits.md b/src/traits.md index f9e3299f9..4d9526623 100644 --- a/src/traits.md +++ b/src/traits.md @@ -1,4 +1,4 @@ -% Traits +# Traits A trait is a language feature that tells the Rust compiler about functionality a type must provide. diff --git a/src/ufcs.md b/src/ufcs.md index 772597056..016ecc709 100644 --- a/src/ufcs.md +++ b/src/ufcs.md @@ -1,4 +1,4 @@ -% Universal Function Call Syntax +# Universal Function Call Syntax Sometimes, functions can have the same names. Consider this code: diff --git a/src/unsafe-rust.md b/src/unsafe-rust.md index 1b223365b..7d269eb83 100644 --- a/src/unsafe-rust.md +++ b/src/unsafe-rust.md @@ -1,4 +1,4 @@ -% Unsafe +# Unsafe Rust’s main draw is its powerful static guarantees about behavior. But safety checks are conservative by nature: there are some programs that are actually diff --git a/src/using-rust-from-other-languages.md b/src/using-rust-from-other-languages.md index 61627c0b5..71efc91ce 100644 --- a/src/using-rust-from-other-languages.md +++ b/src/using-rust-from-other-languages.md @@ -1,4 +1,4 @@ -% Rust Inside Other Languages +# Using Rust From Other Languages For our third project, we’re going to choose something that shows off one of Rust’s greatest strengths: a lack of a substantial runtime. diff --git a/src/variable-bindings.md b/src/variable-bindings.md index f3a5d1dd8..b1239e3bb 100644 --- a/src/variable-bindings.md +++ b/src/variable-bindings.md @@ -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 diff --git a/src/vectors.md b/src/vectors.md index 7b826f08a..99cb3be87 100644 --- a/src/vectors.md +++ b/src/vectors.md @@ -1,4 +1,4 @@ -% Vectors +# Vectors A ‘vector’ is a dynamic or ‘growable’ array, implemented as the standard library type [`Vec`][vec]. The `T` means that we can have vectors