about summary refs log tree commit diff
path: root/src/doc/trpl
AgeCommit message (Collapse)AuthorLines
2015-02-23Rollup merge of #22612 - jxcl:iter-replace, r=steveklabnikManish Goregaokar-13/+13
r? @steveklabnik I've updated the iterators chapter to reflect the fact that you can now iterate over `for` loops without calling `.iter()`.
2015-02-23Rollup merge of #22593 - brson:spatch, r=steveklabnikManish Goregaokar-4/+5
r? @steveklabnik
2015-02-23Rollup merge of #22556 - brson:str, r=steveklabnikManish Goregaokar-7/+10
Clarify that `to_string` is how you make `String`. Use a coercion in an example. r? @steveklabnik
2015-02-23Static and dynamic dispatch: missing wordSteve Klabnik-2/+2
2015-02-22Fixed erroneous statements in iterators.md.Alexander Bliskovsky-8/+5
2015-02-22Switch to &vector notation in the iterators chapter.Alexander Bliskovsky-13/+16
2015-02-22Rollup merge of #22625 - inrustwetrust:dispatch-doc-grammar, r=huonwManish Goregaokar-9/+9
As far as I could tell from discussions in other docs pull requests, American spelling is preferred for the docs?
2015-02-22Rollup merge of #22524 - stevencrockett:master, r=steveklabnikManish Goregaokar-1/+1
The text is referring to the io module despite the code using the old_io module.
2015-02-22Rollup merge of #22515 - adamhjk:add-else-if-to-docs, r=steveklabnikManish Goregaokar-0/+14
Adds an example of `else if` to the If section of The Rust Programming Language. r? @steveklabnik
2015-02-22Rollup merge of #22267 - steveklabnik:fix_lie, r=GankroManish Goregaokar-2/+7
Otherwise, this line is a lie.
2015-02-21Minor grammar/spelling fixes to the "Static and Dynamic Dispatch" docinrustwetrust-9/+9
2015-02-20docs: Explain static dispatch advantage more clearlyBrian Anderson-4/+5
2015-02-19book: Minor clarifications about stringsBrian Anderson-7/+10
2015-02-19docs: correct guessing game to mention old_io module instead of ioSteven Crockett-1/+1
The text is referring to the io module despite the code using the old_io module.
2015-02-18Add documentation for `else if` to trplAdam Jacob-0/+14
Adds an example of `else if` to the If section of The Rust Programming Language. r? @steveklabnik
2015-02-18rollup merge of #22502: nikomatsakis/deprecate-bracket-bracketAlex Crichton-1/+1
Conflicts: src/libcollections/slice.rs src/libcollections/str.rs src/librustc/middle/lang_items.rs src/librustc_back/rpath.rs src/librustc_typeck/check/regionck.rs src/libstd/ffi/os_str.rs src/libsyntax/diagnostic.rs src/libsyntax/parse/parser.rs src/libsyntax/util/interner.rs src/test/run-pass/regions-refcell.rs
2015-02-18Replace all uses of `&foo[]` with `&foo[..]` en masse.Niko Matsakis-1/+1
2015-02-18rollup merge of #22497: nikomatsakis/suffixesAlex Crichton-2/+2
Conflicts: src/librustc_trans/trans/tvec.rs
2015-02-18rollup merge of #22484: riginding/masterAlex Crichton-1/+1
2015-02-18std: Implement CString-related RFCsAlex Crichton-2/+2
This commit is an implementation of [RFC 592][r592] and [RFC 840][r840]. These two RFCs tweak the behavior of `CString` and add a new `CStr` unsized slice type to the module. [r592]: https://github.com/rust-lang/rfcs/blob/master/text/0592-c-str-deref.md [r840]: https://github.com/rust-lang/rfcs/blob/master/text/0840-no-panic-in-c-string.md The new `CStr` type is only constructable via two methods: 1. By `deref`'ing from a `CString` 2. Unsafely via `CStr::from_ptr` The purpose of `CStr` is to be an unsized type which is a thin pointer to a `libc::c_char` (currently it is a fat pointer slice due to implementation limitations). Strings from C can be safely represented with a `CStr` and an appropriate lifetime as well. Consumers of `&CString` should now consume `&CStr` instead to allow producers to pass in C-originating strings instead of just Rust-allocated strings. A new constructor was added to `CString`, `new`, which takes `T: IntoBytes` instead of separate `from_slice` and `from_vec` methods (both have been deprecated in favor of `new`). The `new` method returns a `Result` instead of panicking. The error variant contains the relevant information about where the error happened and bytes (if present). Conversions are provided to the `io::Error` and `old_io::IoError` types via the `FromError` trait which translate to `InvalidInput`. This is a breaking change due to the modification of existing `#[unstable]` APIs and new deprecation, and more detailed information can be found in the two RFCs. Notable breakage includes: * All construction of `CString` now needs to use `new` and handle the outgoing `Result`. * Usage of `CString` as a byte slice now explicitly needs a `.as_bytes()` call. * The `as_slice*` methods have been removed in favor of just having the `as_bytes*` methods. Closes #22469 Closes #22470 [breaking-change]
2015-02-18revised pointer exampleJunseok Lee-13/+14
2015-02-18Update docs by dropping suffixes except where they served to instruct.Niko Matsakis-2/+2
2015-02-18Fixed link in ffi documentationRyan Riginding-1/+1
2015-02-17Test fixes and rebase conflictsAlex Crichton-1/+1
2015-02-17Test fixes and rebase conflictsAlex Crichton-40/+22
2015-02-17rollup merge of #22123: steveklabnik/doc_where_clausesAlex Crichton-0/+90
Closes #21859.
2015-02-17fix doctestManish Goregaokar-1/+1
2015-02-17Rollup merge of #22393 - kmcallister:macros-chapter , r=steveklabnikManish Goregaokar-524/+512
This is a more introductory document, suitable for Part II. The arcane details move to an "Advanced macros" chapter in Part III. Conflicts: src/doc/trpl/macros.md
2015-02-17Rollup merge of #22410 - Reignbeaux:master, r=steveklabnikManish Goregaokar-2/+2
I just stumbled on a typo and fixed it.
2015-02-17Rollup merge of #22333 - caipre:patch-1, r=steveklabnikManish Goregaokar-2/+2
The `Circle::grow` method multiplies the radius by a factor of 10, not 2.
2015-02-17Rollup merge of #22296 - steveklabnik:gh21577, r=GankroManish Goregaokar-43/+41
Fixes #21577.
2015-02-17Rollup merge of #22027 - iblech:patch-1, r=steveklabnikManish Goregaokar-10/+10
The first commit adds a short note which I believe will reduce worries in people who work with closures very often and read the Rust book for their first time. The second commit consists solely of tiny typo fixes. In some cases, I changed "logical" quotations like She said, "I like programming". to She said, "I like programming." because the latter seems to be the prevalent style in the book.
2015-02-17Rollup merge of #22241 - kmcallister:macro-plugin-cleanup, r=sfacklerManish Goregaokar-0/+10
2015-02-17Rollup merge of #22378 - jxcl:master, r=steveklabnikManish Goregaokar-0/+5
The Rust Programming Language book has no explanation of what `i32` actually means. I have added an explanation for the first time the reader encounters this type.
2015-02-17Rollup merge of #22377 - thiagooak:book-glossary, r=steveklabnikManish Goregaokar-0/+17
@steveklabnik Trying out the Glossary idea. Added the paragraph about 'complicated words' because I think it would be useful to those contributing to the book. Maybe this should not be here
2015-02-17Rollup merge of #22368 - thiagooak:book-arity, r=steveklabnikManish Goregaokar-1/+2
#21568
2015-02-17Rollup merge of #22365 - serejkus:configs-link, r=steveklabnikManish Goregaokar-1/+1
The book in "hello-world" tells that there are configs for some programs and gives a link to main repo's src/etc. Actually, these configs moved to separate repos some days ago. This PR adds a markdown file with links and moves "hello-world" link about editors to point directly to this new file.
2015-02-16Tiny typo changes (per discussion in pull request #22027)Ingo Blechschmidt-8/+7
2015-02-16Rewrite the macros chapterKeegan McAllister-524/+512
This is a more introductory document, suitable for Part II. The arcane details move to an "Advanced macros" chapter in Part III.
2015-02-16Fixed typo and removed unfitting 'can'Henrik Schopmans-2/+2
2015-02-16Document where clauses.Steve Klabnik-0/+90
Closes #21859.
2015-02-16Remove use of range() in iterator docs.Steve Klabnik-43/+41
Fixes #21577.
2015-02-16Fix grammarManish Goregaokar-1/+1
2015-02-15improve textThiago Carvalho-3/+2
2015-02-15Added explanation to trpl of integer types.Alexander Bliskovsky-0/+5
2015-02-15glossaryThiago Carvalho-0/+18
2015-02-15Book - short explanation of arityThiago Carvalho-1/+2
2015-02-15Rollup merge of #22256 - brson:installer-next, r=alexcrichtonManish Goregaokar-3/+3
Highlights: * Adds an 'uninstall.sh' script to `/usr/local/lib/rustlib/uninstall.sh`, the path to which is printed during installation. * Components can be deselected during install, like `install.sh --without=rust-docs`. * Components can be listed with `install.sh --list-components`. * Vastly reduces spew during install (but supporting a `--verbose` option). Typicall install run looks like: ``` brian@brianX1:~/dev/multirust⟫ sudo ./install.sh [sudo] password for brian: install: creating uninstall script at /usr/local/lib/rustlib/uninstall.sh install: installing component 'rustc' install: installing component 'cargo' install: installing component 'rust-docs' Rust is ready to roll. ``` Needs to be merged right before corresponding PRs to cargo and rust-packaging. Fixes https://github.com/rust-lang/rust/issues/21117 Fixes https://github.com/rust-lang/rust/issues/20283
2015-02-15Rollup merge of #22293 - steveklabnik:gh12891, r=brsonManish Goregaokar-1/+10
Fixes #12891.
2015-02-15Rollup merge of #22329 - thiagooak:book, r=steveklabnikManish Goregaokar-3/+3
on crates and modules - replace \")\" on more strings - improve readability of grapheme