Skip to content

Rollup of 10 pull requests #25874

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 68 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
68 commits
Select commit Hold shift + click to select a range
0d80b2a
docs: Improve descriptions for some methods in core::cell.
May 23, 2015
bbf8ba7
Implement Eq for Cell and RefCell.
SimonSapin May 24, 2015
16334e5
Add a missing space to the Glossary page of TRPL
maxjacobson May 26, 2015
d323c14
Remove redundant compiler check. Allow CC override
koobs May 26, 2015
ae10e47
Implement defaults for associated types
May 26, 2015
04c7b82
Document std::env::const values
steveklabnik May 21, 2015
65a3245
Add tests for fixed issues
May 26, 2015
bc7c62d
mk: Ensure LINK_$(1) is defined for all targets
alexcrichton May 26, 2015
909cbbe
Enable colored test output when capturing output of tests
jooert May 26, 2015
ff68204
Add a WONTFIX message to a failing test.
nrc May 26, 2015
577bbac
Add note about filesystems to fs::rename
steveklabnik May 5, 2015
ea5c8eb
Bump manpage date and version for 1.2.0-dev.
rillian May 26, 2015
bb61b0b
Update rustc manpage.
rillian May 26, 2015
279ec9b
test: Join child threads on windows in tests
alexcrichton May 27, 2015
af60248
Auto merge of #25799 - alexcrichton:fix-link-in-mk, r=luqmana
bors May 27, 2015
c68e652
test fixes
May 27, 2015
699fc80
Address review comments
May 27, 2015
62e5dee
fix example for E0018
steveklabnik May 27, 2015
4db7e56
Small wording fix in TRPL: lifetimes
steveklabnik May 27, 2015
689e94b
Rollup merge of #25128 - steveklabnik:gh24816, r=alexcrichton
Manishearth May 27, 2015
0401617
Rollup merge of #25668 - steveklabnik:doc_const, r=alexcrichton
Manishearth May 27, 2015
db1914e
Rollup merge of #25726 - nham:cell_docs, r=alexcrichton
Manishearth May 27, 2015
6c2b340
Improve docs for Vec::as_slice and as_mut_slice
mbrubeck May 27, 2015
0e1a71c
Rollup merge of #25792 - koobs:patch-1, r=alexcrichton
Manishearth May 27, 2015
aec0a4b
Rollup merge of #25806 - nrc:20184-msg, r=alexcrichton
Manishearth May 27, 2015
6090d15
Rollup merge of #25807 - rillian:manpages, r=alexcrichton
Manishearth May 27, 2015
47f9e52
Auto merge of #25827 - Manishearth:rollup, r=Manishearth
bors May 27, 2015
f3819f0
Auto merge of #25796 - arielb1:default-assoc, r=eddyb
bors May 27, 2015
875d356
Remove mentions of int / uint from the isize / usize docs
shepmaster May 27, 2015
a959cc4
Remove mentions of int / uint from public documentation
shepmaster May 27, 2015
f76d9bc
Auto merge of #25805 - jooert:colorized_tests, r=alexcrichton
bors May 28, 2015
080311d
Prevent comparison and dereferencing of raw pointers in constexprs
May 27, 2015
1a3cffb
Auto merge of #25824 - alexcrichton:fix-deadlocking-test-on-windows, …
bors May 28, 2015
6a3d55a
Auto merge of #25840 - arielb1:ptr-compare-fixes, r=nrc
bors May 28, 2015
b2c8719
save-analysis: move another couple of things to the API
nrc May 25, 2015
23ec007
TRPL: fix typo, borow for borrow
reinh May 28, 2015
448ce12
Auto merge of #25783 - nrc:save-api-2, r=@huonw
bors May 28, 2015
4f66d88
Auto merge of #25843 - shepmaster:remove-public-int-and-uint, r=huonw
bors May 28, 2015
d061a0f
floating-point types are machine types, not machine-dependent types
liigo May 28, 2015
4233cbd
Auto merge of #25849 - reinh:patch-1, r=huonw
bors May 28, 2015
a5a5fce
Auto merge of #25834 - steveklabnik:gh25326, r=alexcrichton
bors May 28, 2015
2a63cc7
TRPL: Fix Unescaped URL
killercup May 28, 2015
9c30394
Auto merge of #25835 - steveklabnik:gh25438, r=alexcrichton
bors May 28, 2015
16a47c2
remove references to IoResult
steveklabnik May 27, 2015
621a10e
Auto merge of #25829 - steveklabnik:ioresult_fixes, r=alexcrichton
bors May 28, 2015
d0e6396
Document #[repr] on non-C-like enums
May 20, 2015
5249cbb
collections: Make BinaryHeap panic safe in sift_up / sift_down
May 28, 2015
977d40f
Improve Debug documentation
steveklabnik May 27, 2015
efebe45
Auto merge of #25856 - bluss:binary-heap-hole, r=Gankro
bors May 28, 2015
15ab481
removed lonely closing parenthesis
azerupi May 28, 2015
53941be
Auto merge of #25744 - SimonSapin:cell-eq, r=alexcrichton
bors May 28, 2015
15aeea5
Corrected typo
azerupi May 28, 2015
19cb2a7
add newline before list in functions-and-methods
dcampbell24 Feb 14, 2015
0670651
Make adjancent code examples more similar
frewsxcv Feb 21, 2015
4d90b4d
Update let.md -- follow whitespace style guideline
dcampbell24 Mar 30, 2015
31a007a
remove extra space from "over" code as well
dcampbell24 Mar 30, 2015
d0744ba
Fix mistake: "to to" -> "to"
nliberg May 23, 2015
adac861
Fix link to newtypes page
nliberg May 23, 2015
05ec837
Rollup merge of #25651 - bluss:doc-enum-repr, r=alexcrichton
steveklabnik May 29, 2015
3224c57
Rollup merge of #25788 - maxjacobson:add-missing-space-to-glossary, r…
steveklabnik May 29, 2015
374a719
Rollup merge of #25830 - steveklabnik:debug_docs, r=alexcrichton
steveklabnik May 29, 2015
3f511f7
Rollup merge of #25832 - edunham:document-gh-issue-tags, r=alexcrichton
steveklabnik May 29, 2015
d3a9dc1
Rollup merge of #25838 - mbrubeck:doc-edit, r=steveklabnik
steveklabnik May 29, 2015
464594c
Rollup merge of #25854 - liigo:patch-1, r=alexcrichton
steveklabnik May 29, 2015
082f779
Rollup merge of #25857 - killercup:patch-14, r=steveklabnik
steveklabnik May 29, 2015
2624117
Rollup merge of #25864 - azerupi:patch-1, r=alexcrichton
steveklabnik May 29, 2015
93d7af0
Rollup merge of #25865 - azerupi:patch-2, r=alexcrichton
steveklabnik May 29, 2015
35d6491
Rollup merge of #25866 - jooert:update_guidelines, r=steveklabnik
steveklabnik May 29, 2015
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -863,11 +863,6 @@ then
CFG_DISABLE_JEMALLOC=1
fi

if [ -z "$CFG_ENABLE_CLANG" -a -z "$CFG_GCC" ]
then
err "either clang or gcc is required"
fi

# OS X 10.9, gcc is actually clang. This can cause some confusion in the build
# system, so if we find that gcc is clang, we should just use clang directly.
if [ $CFG_OSTYPE = apple-darwin -a -z "$CFG_ENABLE_CLANG" ]
Expand Down
4 changes: 2 additions & 2 deletions man/rustc.1
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.TH RUSTC "1" "March 2014" "rustc 0.13.0" "User Commands"
.TH RUSTC "1" "August 2015" "rustc 1.2.0" "User Commands"
.SH NAME
rustc \- The Rust compiler
.SH SYNOPSIS
Expand Down Expand Up @@ -160,7 +160,7 @@ If the value is 'help', then a list of available CPUs is printed.
\fBtarget\-feature\fR='\fI+feature1\fR,\fI\-feature2\fR'
A comma\[hy]separated list of features to enable or disable for the target.
A preceding '+' enables a feature while a preceding '\-' disables it.
Available features can be discovered through \fItarget\-cpu=help\fR.
Available features can be discovered through \fIllc -mcpu=help\fR.
.TP
\fBpasses\fR=\fIval\fR
A space\[hy]separated list of extra LLVM passes to run.
Expand Down
2 changes: 1 addition & 1 deletion man/rustdoc.1
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.TH RUSTDOC "1" "March 2014" "rustdoc 0.13.0" "User Commands"
.TH RUSTDOC "1" "August 2015" "rustdoc 1.2.0" "User Commands"
.SH NAME
rustdoc \- generate documentation from Rust source code
.SH SYNOPSIS
Expand Down
1 change: 0 additions & 1 deletion mk/cfg/aarch64-linux-android.mk
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# aarch64-linux-android configuration
# CROSS_PREFIX_aarch64-linux-android-
CC_aarch64-linux-android=$(CFG_ANDROID_CROSS_PATH)/bin/aarch64-linux-android-gcc
LINK_aarch64-linux-android=$(CFG_ANDROID_CROSS_PATH)/bin/aarch64-linux-android-gcc
CXX_aarch64-linux-android=$(CFG_ANDROID_CROSS_PATH)/bin/aarch64-linux-android-g++
CPP_aarch64-linux-android=$(CFG_ANDROID_CROSS_PATH)/bin/aarch64-linux-android-gcc -E
AR_aarch64-linux-android=$(CFG_ANDROID_CROSS_PATH)/bin/aarch64-linux-android-ar
Expand Down
1 change: 0 additions & 1 deletion mk/cfg/aarch64-unknown-linux-gnu.mk
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# aarch64-unknown-linux-gnu configuration
CROSS_PREFIX_aarch64-unknown-linux-gnu=aarch64-linux-gnu-
CC_aarch64-unknown-linux-gnu=gcc
LINK_aarch64-unknown-linux-gnu=gcc
CXX_aarch64-unknown-linux-gnu=g++
CPP_aarch64-unknown-linux-gnu=gcc -E
AR_aarch64-unknown-linux-gnu=ar
Expand Down
1 change: 0 additions & 1 deletion mk/cfg/arm-linux-androideabi.mk
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# arm-linux-androideabi configuration
LINK_arm-linux-androideabi=$(CFG_ANDROID_CROSS_PATH)/bin/arm-linux-androideabi-gcc
CC_arm-linux-androideabi=$(CFG_ANDROID_CROSS_PATH)/bin/arm-linux-androideabi-gcc
CXX_arm-linux-androideabi=$(CFG_ANDROID_CROSS_PATH)/bin/arm-linux-androideabi-g++
CPP_arm-linux-androideabi=$(CFG_ANDROID_CROSS_PATH)/bin/arm-linux-androideabi-gcc -E
Expand Down
1 change: 0 additions & 1 deletion mk/cfg/i686-apple-darwin.mk
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# i686-apple-darwin configuration
CC_i686-apple-darwin=$(CC)
LINK_i686-apple-darwin=cc
CXX_i686-apple-darwin=$(CXX)
CPP_i686-apple-darwin=$(CPP)
AR_i686-apple-darwin=$(AR)
Expand Down
1 change: 0 additions & 1 deletion mk/cfg/i686-unknown-linux-gnu.mk
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# i686-unknown-linux-gnu configuration
CC_i686-unknown-linux-gnu=$(CC)
LINK_i686-unknown-linux-gnu=cc
CXX_i686-unknown-linux-gnu=$(CXX)
CPP_i686-unknown-linux-gnu=$(CPP)
AR_i686-unknown-linux-gnu=$(AR)
Expand Down
1 change: 0 additions & 1 deletion mk/cfg/x86_64-apple-darwin.mk
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# x86_64-apple-darwin configuration
CC_x86_64-apple-darwin=$(CC)
LINK_x86_64-apple-darwin=cc
CXX_x86_64-apple-darwin=$(CXX)
CPP_x86_64-apple-darwin=$(CPP)
AR_x86_64-apple-darwin=$(AR)
Expand Down
1 change: 0 additions & 1 deletion mk/cfg/x86_64-pc-windows-gnu.mk
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# x86_64-pc-windows-gnu configuration
CROSS_PREFIX_x86_64-pc-windows-gnu=x86_64-w64-mingw32-
CC_x86_64-pc-windows-gnu=gcc
LINK_x86_64-pc-windows-gnu=gcc
CXX_x86_64-pc-windows-gnu=g++
CPP_x86_64-pc-windows-gnu=gcc -E
AR_x86_64-pc-windows-gnu=ar
Expand Down
1 change: 0 additions & 1 deletion mk/cfg/x86_64-unknown-linux-gnu.mk
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# x86_64-unknown-linux-gnu configuration
CC_x86_64-unknown-linux-gnu=$(CC)
LINK_x86_64-unknown-linux-gnu=cc
CXX_x86_64-unknown-linux-gnu=$(CXX)
CPP_x86_64-unknown-linux-gnu=$(CPP)
AR_x86_64-unknown-linux-gnu=$(AR)
Expand Down
9 changes: 9 additions & 0 deletions mk/platform.mk
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,15 @@ endef
$(foreach target,$(CFG_TARGET), \
$(eval $(call ADD_INSTALLED_OBJECTS,$(target))))

define DEFINE_LINKER
ifndef LINK_$(1)
LINK_$(1) := $$(CC_$(1))
endif
endef

$(foreach target,$(CFG_TARGET), \
$(eval $(call DEFINE_LINKER,$(target))))

# The -Qunused-arguments sidesteps spurious warnings from clang
define FILTER_FLAGS
ifeq ($$(CFG_USING_CLANG),1)
Expand Down
2 changes: 1 addition & 1 deletion src/doc/complement-design-faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ that all delimiters be balanced.
## `->` for function return type

This is to make the language easier to parse for humans, especially in the face
of higher-order functions. `fn foo<T>(f: fn(int): int, fn(T): U): U` is not
of higher-order functions. `fn foo<T>(f: fn(i32): i32, fn(T): U): U` is not
particularly easy to read.

## Why is `let` used to introduce variables?
Expand Down
17 changes: 9 additions & 8 deletions src/doc/reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -1892,12 +1892,13 @@ interpreted:

On `enum`s:

- `repr` - on C-like enums, this sets the underlying type used for
representation. Takes one argument, which is the primitive
type this enum should be represented for, or `C`, which specifies that it
should be the default `enum` size of the C ABI for that platform. Note that
enum representation in C is undefined, and this may be incorrect when the C
code is compiled with certain flags.
- `repr` - this sets the underlying type used for representation of the
discriminant. Takes one argument, which is the primitive type this enum
should be represented as, or `C`, which specifies that it should be the
default `enum` size of the C ABI for that platform. Note that enum
representation in C is implementation defined, and this may be incorrect when
the C code is compiled with certain flags. The representation attribute
inhibits elision of the enum discriminant in layout optimizations.

On `struct`s:

Expand Down Expand Up @@ -3255,8 +3256,8 @@ User-defined types have limited capabilities.
The primitive types are the following:

* The boolean type `bool` with values `true` and `false`.
* The machine types.
* The machine-dependent integer and floating-point types.
* The machine types (integer and floating-point).
* The machine-dependent integer types.

#### Machine types

Expand Down
10 changes: 5 additions & 5 deletions src/doc/style/errors/ergonomics.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ use std::io::{File, Open, Write, IoError};

struct Info {
name: String,
age: int,
rating: int
age: i32,
rating: i32
}

fn write_info(info: &Info) -> Result<(), IoError> {
Expand All @@ -36,8 +36,8 @@ use std::io::{File, Open, Write, IoError};

struct Info {
name: String,
age: int,
rating: int
age: i32,
rating: i32
}

fn write_info(info: &Info) -> Result<(), IoError> {
Expand All @@ -63,4 +63,4 @@ for more details.
### The `Result`-`impl` pattern [FIXME]

> **[FIXME]** Document the way that the `io` module uses trait impls
> on `IoResult` to painlessly propagate errors.
> on `std::io::Result` to painlessly propagate errors.
1 change: 1 addition & 0 deletions src/doc/style/features/functions-and-methods/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ for any operation that is clearly associated with a particular
type.

Methods have numerous advantages over functions:

* They do not need to be imported or qualified to be used: all you
need is a value of the appropriate type.
* Their invocation performs autoborrowing (including mutable borrows).
Expand Down
12 changes: 6 additions & 6 deletions src/doc/style/features/functions-and-methods/input.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,15 +57,15 @@ it becomes.
Prefer

```rust
fn foo<T: Iterator<int>>(c: T) { ... }
fn foo<T: Iterator<i32>>(c: T) { ... }
```

over any of

```rust
fn foo(c: &[int]) { ... }
fn foo(c: &Vec<int>) { ... }
fn foo(c: &SomeOtherCollection<int>) { ... }
fn foo(c: &[i32]) { ... }
fn foo(c: &Vec<i32>) { ... }
fn foo(c: &SomeOtherCollection<i32>) { ... }
```

if the function only needs to iterate over the data.
Expand Down Expand Up @@ -121,7 +121,7 @@ The primary exception: sometimes a function is meant to modify data
that the caller already owns, for example to re-use a buffer:

```rust
fn read(&mut self, buf: &mut [u8]) -> IoResult<uint>
fn read(&mut self, buf: &mut [u8]) -> std::io::Result<usize>
```

(From the [Reader trait](http://static.rust-lang.org/doc/master/std/io/trait.Reader.html#tymethod.read).)
Expand Down Expand Up @@ -159,7 +159,7 @@ fn foo(a: u8) { ... }
Note that
[`ascii::Ascii`](http://static.rust-lang.org/doc/master/std/ascii/struct.Ascii.html)
is a _wrapper_ around `u8` that guarantees the highest bit is zero; see
[newtype patterns]() for more details on creating typesafe wrappers.
[newtype patterns](../types/newtype.md) for more details on creating typesafe wrappers.

Static enforcement usually comes at little run-time cost: it pushes the
costs to the boundaries (e.g. when a `u8` is first converted into an
Expand Down
4 changes: 2 additions & 2 deletions src/doc/style/features/functions-and-methods/output.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@ Prefer
```rust
struct SearchResult {
found: bool, // item in container?
expected_index: uint // what would the item's index be?
expected_index: usize // what would the item's index be?
}

fn binary_search(&self, k: Key) -> SearchResult
```
or

```rust
fn binary_search(&self, k: Key) -> (bool, uint)
fn binary_search(&self, k: Key) -> (bool, usize)
```

over
Expand Down
12 changes: 6 additions & 6 deletions src/doc/style/features/let.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
Prefer

```rust
fn use_mutex(m: sync::mutex::Mutex<int>) {
fn use_mutex(m: sync::mutex::Mutex<i32>) {
let guard = m.lock();
do_work(guard);
drop(guard); // unlock the lock
Expand All @@ -16,7 +16,7 @@ fn use_mutex(m: sync::mutex::Mutex<int>) {
over

```rust
fn use_mutex(m: sync::mutex::Mutex<int>) {
fn use_mutex(m: sync::mutex::Mutex<i32>) {
do_work(m.lock());
// do other work
}
Expand All @@ -34,7 +34,7 @@ Prefer

```rust
let foo = match bar {
Baz => 0,
Baz => 0,
Quux => 1
};
```
Expand All @@ -44,7 +44,7 @@ over
```rust
let foo;
match bar {
Baz => {
Baz => {
foo = 0;
}
Quux => {
Expand All @@ -61,8 +61,8 @@ conditional expression.
Prefer

```rust
s.iter().map(|x| x * 2)
.collect::<Vec<_>>()
let v = s.iter().map(|x| x * 2)
.collect::<Vec<_>>();
```

over
Expand Down
2 changes: 1 addition & 1 deletion src/doc/style/features/traits/reuse.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ trait Printable {
fn print(&self) { println!("{:?}", *self) }
}

impl Printable for int {}
impl Printable for i32 {}

impl Printable for String {
fn print(&self) { println!("{}", *self) }
Expand Down
4 changes: 2 additions & 2 deletions src/doc/style/features/types/newtype.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,12 @@ promises to the client.

For example, consider a function `my_transform` that returns a compound iterator
type `Enumerate<Skip<vec::MoveItems<T>>>`. We wish to hide this type from the
client, so that the client's view of the return type is roughly `Iterator<(uint,
client, so that the client's view of the return type is roughly `Iterator<(usize,
T)>`. We can do so using the newtype pattern:

```rust
struct MyTransformResult<T>(Enumerate<Skip<vec::MoveItems<T>>>);
impl<T> Iterator<(uint, T)> for MyTransformResult<T> { ... }
impl<T> Iterator<(usize, T)> for MyTransformResult<T> { ... }

fn my_transform<T, Iter: Iterator<T>>(iter: Iter) -> MyTransformResult<T> {
...
Expand Down
4 changes: 2 additions & 2 deletions src/doc/style/ownership/builders.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ If `T` is such a data structure, consider introducing a `T` _builder_:
value. When possible, choose a better name: e.g. `Command` is the builder for
`Process`.
2. The builder constructor should take as parameters only the data _required_ to
to make a `T`.
make a `T`.
3. The builder should offer a suite of convenient methods for configuration,
including setting up compound inputs (like slices) incrementally.
These methods should return `self` to allow chaining.
Expand Down Expand Up @@ -75,7 +75,7 @@ impl Command {
}

/// Executes the command as a child process, which is returned.
pub fn spawn(&self) -> IoResult<Process> {
pub fn spawn(&self) -> std::io::Result<Process> {
...
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/doc/style/style/features.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Terminate `return` statements with semicolons:

``` rust
fn foo(bar: int) -> Option<int> {
fn foo(bar: i32) -> Option<i32> {
if some_condition() {
return None;
}
Expand Down
2 changes: 1 addition & 1 deletion src/doc/style/style/imports.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ For example:
use option::Option;
use mem;

let i: int = mem::transmute(Option(0));
let i: isize = mem::transmute(Option(0));
```

> **[FIXME]** Add rationale.
2 changes: 1 addition & 1 deletion src/doc/style/style/whitespace.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

``` rust
#[deprecated = "Use `bar` instead."]
fn foo(a: uint, b: uint) -> uint {
fn foo(a: usize, b: usize) -> usize {
a + b
}
```
Expand Down
2 changes: 1 addition & 1 deletion src/doc/trpl/associated-types.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ trait Graph {
Now, our clients can be abstract over a given `Graph`:

```rust,ignore
fn distance<G: Graph>(graph: &G, start: &G::N, end: &G::N) -> uint { ... }
fn distance<G: Graph>(graph: &G, start: &G::N, end: &G::N) -> usize { ... }
```

No need to deal with the `E`dge type here!
Expand Down
2 changes: 1 addition & 1 deletion src/doc/trpl/box-syntax-and-patterns.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ fn main() {
```

The idea is that by passing around a box, you're only copying a pointer, rather
than the hundred `int`s that make up the `BigStruct`.
than the hundred `i32`s that make up the `BigStruct`.

This is an antipattern in Rust. Instead, write this:

Expand Down
2 changes: 1 addition & 1 deletion src/doc/trpl/conditional-compilation.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ These can nest arbitrarily:
As for how to enable or disable these switches, if you’re using Cargo,
they get set in the [`[features]` section][features] of your `Cargo.toml`:

[features]: http://doc.crates.io/manifest.html#the-[features]-section
[features]: http://doc.crates.io/manifest.html#the-%5Bfeatures%5D-section

```toml
[features]
Expand Down
2 changes: 1 addition & 1 deletion src/doc/trpl/glossary.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ In the example above `x` and `y` have arity 2. `z` has arity 3.

When a compiler is compiling your program, it does a number of different
things. One of the things that it does is turn the text of your program into an
‘abstract syntax tree’, or‘AST’. This tree is a representation of the
‘abstract syntax tree’, or ‘AST’. This tree is a representation of the
structure of your program. For example, `2 + 3` can be turned into a tree:

```text
Expand Down
Loading