about summary refs log tree commit diff
path: root/src/doc/book
AgeCommit message (Collapse)AuthorLines
2016-03-09Remove inaccurate claim about inline assemblySteve Klabnik-2/+1
It's not like GCC's. Fixes #20213
2016-03-09Small grammar fix in Guessing GameSteve Klabnik-1/+1
When it was Option.expect(), there was an .ok().expect(), but now that it uses Result.expect(), there's only one method, not two. Fixes #31912
2016-03-08doc: Fix a bunch of broken linksAlex Crichton-37/+23
A few categories: * Links into compiler docs were just all removed as we're not generating compiler docs. * Move up one more level to forcibly go to std docs to fix inlined documentation across the facade crates.
2016-03-08Rollup merge of #32115 - tclfs:patch-1, r=apasel422Steve Klabnik-1/+1
Update a spelling inconsistency L26: "zero cost" -> "zero-cost"
2016-03-08Rollup merge of #32103 - timmontague:patch-1, r=alexcrichtonSteve Klabnik-1/+1
Fixed link in ownership documentation Changed "[vector]" to a link to the vector documentation.
2016-03-08Rollup merge of #32092 - bluss:operator-overload, r=steveklabnikSteve Klabnik-10/+10
Update syntax index with OpAssign traits book: Update syntax index with OpAssign traits The traits are stable from Rust 1.8.
2016-03-08Remove final note from testing chapter.Pyfisch-4/+0
The information that documentation tests cannot be run in binary crates is already given at the beginning of the section.
2016-03-08Update a spelling inconsistencyTang Chenglong-1/+1
L26: "zero cost" -> "zero-cost"
2016-03-07Fixed linkTim Montague-1/+1
Changed "[vector]" to a link to the vector documentation.
2016-03-07book: Update syntax index with OpAssign traitsUlrik Sverdrup-10/+10
2016-03-06Auto merge of #30884 - durka:inclusive-ranges, r=aturonbors-1/+8
This PR implements [RFC 1192](https://github.com/rust-lang/rfcs/blob/master/text/1192-inclusive-ranges.md), which is triple-dot syntax for inclusive range expressions. The new stuff is behind two feature gates (one for the syntax and one for the std::ops types). This replaces the deprecated functionality in std::iter. Along the way I simplified the desugaring for all ranges. This is my first contribution to rust which changes more than one character outside of a test or comment, so please review carefully! Some of the individual commit messages have more of my notes. Also thanks for putting up with my dumb questions in #rust-internals. - For implementing `std::ops::RangeInclusive`, I took @Stebalien's suggestion from https://github.com/rust-lang/rfcs/pull/1192#issuecomment-137864421. It seemed to me to make the implementation easier and increase type safety. If that stands, the RFC should be amended to avoid confusion. - I also kind of like @glaebhoerl's [idea](https://github.com/rust-lang/rfcs/pull/1254#issuecomment-147815299), which is unified inclusive/exclusive range syntax something like `x>..=y`. We can experiment with this while everything is behind a feature gate. - There are a couple of FIXMEs left (see the last commit). I didn't know what to do about `RangeArgument` and I haven't added `Index` impls yet. Those should be discussed/finished before merging. cc @Gankro since you [complained](https://www.reddit.com/r/rust/comments/3xkfro/what_happened_to_inclusive_ranges/cy5j0yq) cc #27777 #30877 rust-lang/rust#1192 rust-lang/rfcs#1254 relevant to #28237 (tracking issue)
2016-03-04Rollup merge of #32002 - srinivasreddy:vector_doc, r=ManishearthSteve Klabnik-0/+30
Issue here : https://github.com/rust-lang/rust/issues/31991
2016-03-03added ignoresrinivasreddy-1/+1
2016-03-02made print message similar across two loopssrinivasreddy-1/+1
2016-03-02addressed review comments - grammar corrections, space additionssrinivasreddy-5/+12
2016-03-02Explained the difference between ownership iteration and reference iterationsrinivasreddy-0/+23
2016-03-01Make book ordering more naturalEvan-1/+1
Vectors come up in sections dedicated to ownership with the assumption that we know something about it but we haven't seen it yet. On the other hand, you need not know anything about ownership or lifetimes to understand the basics of vectors covered in the vector section of the book. Additionally, by moving it where it is there is a natural progression from loops to an iterative type which discusses for loops. This kind of interaction is generally better for learning. I would like to have moved the struct section as well but I'm less confident about how to handle it since the ownership sections discuss structs and the structs section talks about mutable borrow.
2016-03-01Rollup merge of #31987 - gcatlin:patch-1, r=steveklabnikSteve Klabnik-1/+1
r? @steveklabnik
2016-03-01grammar: 'fewer' instead of 'less'Geoff Catlin-1/+1
2016-02-29Clarified the details of a borrowing example.Evan-4/+4
Had a discussion at https://www.reddit.com/r/rust/comments/488mjv/borrowing_or_returning_ownership/ about how an example could be worded more clearly and tried to take my recommendation and expand upon it with further information provided in the post.
2016-02-29Auto merge of #31958 - teoryn:patch-3, r=nagisabors-1/+1
2016-02-28Fix typo (an Result)Kevin Stock-1/+1
2016-02-28Fix typo (!#[no_std])Kevin Stock-1/+1
2016-02-27Auto merge of #31931 - Luke-Nukem:master, r=steveklabnikbors-9/+9
Refinement of paragraph referenced by [this issue](https://github.com/rust-lang/rust/issues/31927). The paragraph in question had been adjusted already, but I've made some further clarifications which should help with readability and not leave the reader any `dangling pointers`.
2016-02-27Resolve ambiguous documentationKevin Stock-4/+4
See http://www.ietf.org/rfc/rfc2119.txt
2016-02-27document inclusive range syntaxAlex Burka-1/+8
2016-02-27Refinement of paragraph referenced by [thisLuke Jones-9/+9
issue](https://github.com/rust-lang/rust/issues/31927)
2016-02-25Rollup merge of #31827 - teoryn:patch-1, r=brsonManish Goregaokar-1/+1
2016-02-25Rollup merge of #31870 - ivan:filter-explain, r=steveklabnikManish Goregaokar-4/+6
As a Rust newbie, I found the book's explanation for why the `filter` closure gets a reference very confusing, and tried to figure out why `filter` is somehow less consumptive than `map` -- but it isn't; that's controlled by `iter`/`into_iter`. I flailed around for a while until @habnabit explained it to me, and in retrospect it is quite obvious :-)
2016-02-24book: Explain better why the filter closure gets a referenceIvan Kozik-4/+6
2016-02-24Capitalize some occurences of Rust in documentationFlorian Hahn-1/+1
2016-02-22Fix warn(unused_mut) in exampleKevin Stock-1/+1
2016-02-20Fix number of lines and methods in guessing gameChad Shaffer-2/+2
2016-02-17Rollup merge of #31565 - SDX2000:docfixes4, r=steveklabnikSteve Klabnik-9/+53
See title and diff for more information.
2016-02-17Made v2 mutable so that we can actually truncate it.Sandeep Datta-2/+2
2016-02-16Clarify contiguous memory array structure of vectors in documentationDirk Gadsden-2/+9
Closes #31554. Contributes to #29380.
2016-02-14Rollup merge of #31658 - felgru:master, r=steveklabnikSteve Klabnik-1/+1
In the Rust code above this block of compiler output, the function is called print_sum, so use the same function name in the error message.
2016-02-14doc: fix compiler outputFelix Gruber-1/+1
In the Rust code above, the function is called print_sum, so use the same function name in the error message.
2016-02-14doc: Remove trailing whitespacefbergr-1/+1
2016-02-14Rollup merge of #31612 - raindev:grammar, r=steveklabnikManish Goregaokar-1/+1
I feel sorry for bothering you with such a literally one character changes. If it is counter productive feel free to point it out in the comments, that would be totally understandable. I could try to pack such a changes together in one PR to make them less distractive. r? @steveklabnik
2016-02-14Rollup merge of #31610 - Manishearth:doc-clarify-txrx, r=steveklabnikManish Goregaokar-0/+2
Not everyone knows this convention. We could just rename the variables in the example, but since this notation is commonly used it's a good opportunity to introduce it. r? @steveklabnik
2016-02-14Rollup merge of #31563 - SDX2000:docfixes1, r=steveklabnikManish Goregaokar-4/+6
This is a minor change. Please see title. IMO this is important since this is the first instance when we talk about allocating a vector. Not saying that it is allocated on the stack here leaves room for speculation and this might put off some people (they might not even read the later sections which go into more detail about this).
2016-02-13Fixed build error as per steveklabnik's suggestion and expanded on the ills ↵Sandeep Datta-1/+5
of doing out of bounds accesses.
2016-02-12Remove unnecessary articleAndrew Barchuk-1/+1
2016-02-13Clarify what tx/rx mean in concurrency docsManish Goregaokar-0/+2
2016-02-11Minor change.Sandeep Datta-7/+7
2016-02-11Minor change.Sandeep Datta-2/+2
2016-02-11Explained the data race with an example.Sandeep Datta-10/+30
2016-02-11Clarified move semantics in "the details" section.Sandeep Datta-7/+27
2016-02-11Added a few words to indicate where the vector object is created.Sandeep Datta-4/+6