Commit Graph

18 Commits

Author SHA1 Message Date
Alex Burka
900f27dc7c trpl: change from "int" to "i32" in Traits
The Traits chapter uses "adding methods to `int`" as an example of "something bad", but there is no such thing as `int` anymore, right? So I changed it to `i32`.
2015-05-15 12:14:39 -04:00
Steve Klabnik
07499918b3 Fix incorrect curly quotes 2015-05-07 10:26:00 -04:00
Przemysław Wesołek
2c2abe9a75 A number of spell-checking corrections. 2015-04-25 16:48:44 +02:00
Alex Crichton
a568a7f9f2 std: Bring back f32::from_str_radix as an unstable API
This API was exercised in a few tests and mirrors the `from_str_radix`
functionality of the integer types.
2015-04-21 15:23:54 -07:00
Steve Klabnik
e289b689d4 TRPL edits: traits
Let's talk about generics first, since we use traits to bound them
in funtions.

Partially addresses #24325

Fixes #24271
2015-04-20 09:44:10 -04:00
Michael Alexander
91ca622cdf Updated dead link in Traits chapter of book to point to Trait Objects chapter. 2015-04-12 10:42:05 +08:00
Josh Triplett
59d889805e traits.md: Fix example of using traits to match description
traits.md said:

If we add a `use` line right above `main` and make the right things public,
everything is fine:

However, the use line was actually placed at the top of the file instead.  Move
the use line to right above main.  That also makes the example more evocative
of cases where the module is defined in a separate file.
2015-04-06 08:14:11 -07:00
Steve Klabnik
371ba00da2 Add description of + for multiple trait bounds
Fixes #23688
2015-03-31 19:45:09 -04:00
Dan W.
aaf74d1c1b book: Fix typo
r? @steveklabnik
2015-03-28 03:31:51 -07:00
Brian Anderson
e9019101a8 Add #![feature] attributes to doctests 2015-03-23 14:40:26 -07:00
Steve Klabnik
de44baac8b Add default methods to trait documentation 2015-03-08 08:55:17 -04:00
Alex Crichton
665ea963d3 Test fixes and rebase conflicts 2015-02-17 19:42:28 -08:00
Steve Klabnik
faf0f5b196 Document where clauses.
Closes #21859.
2015-02-16 05:31:26 -05:00
Steve Klabnik
dbccd70a57 Add documentation on trait objects.
Largely taken from @huonw's
http://huonw.github.io/blog/2015/01/peeking-inside-trait-objects/

Fixes #21707
2015-02-09 21:38:49 -05:00
Steve Klabnik
899ffcf62a Intpocalypse, book edition.
Fix all usage of int/uint/i/u in the book.
2015-01-17 10:51:07 -05:00
Steve Klabnik
ad0ce88c6c Provide example of generic inverse()
Fixes #17224
2015-01-13 15:42:38 -05:00
Kevin Yap
8f61814641 Standardize punctuation & formatting of TRPL
This commit is an attempt to standardize the use of punctuation and
formatting in "The Rust Programming Language" as discussed in #19823.

- Convert bold text to italicized textcwhen referring to terminology.
- Convert single-quoted text to italicized or double-quoted text,
  depending on context.
- Use double quotes only in the case of scare quotes or quotations.
2015-01-08 17:15:26 -08:00
Alex Crichton
7541f82fab Fix dead links in the guide and reorganize 2015-01-08 10:27:03 -08:00