about summary refs log tree commit diff
path: root/src/doc/trpl
AgeCommit message (Collapse)AuthorLines
2015-06-09Rollup merge of #26105 - tshepang:sentence-not-clear, r=steveklabnikManish Goregaokar-2/+2
2015-06-09Rollup merge of #26104 - saml:patch-1, r=steveklabnikManish Goregaokar-1/+1
Cargo expects `lib` to be table, not an array of tables (only single lib per project).
2015-06-09Rollup merge of #26073 - chuckSMASH:trpl-5-4-comments, r=steveklabnikManish Goregaokar-0/+3
For a user following the path of reading Chapter 5: Syntax & Symantics prior to Chapter 4: Learn Rust, this will be the first time they have encountered executable tests inside documentation comments. The test will fail because the `add_one` function is not defined in the context of the doctest. This might not be the optimal place to introduce and explain the `/// #` notation but I think it is important that this snippet pass as a test when `rustdoc --test` is run against it.
2015-06-09Rollup merge of #25968 - benfleis:master, r=steveklabnikManish Goregaokar-1/+3
to address https://github.com/rust-lang/rust/issues/25488 .
2015-06-09Rollup merge of #25948 - tshepang:misc-doc-improvements, r=steveklabnikManish Goregaokar-15/+15
2015-06-09Rollup merge of #25909 - frankamp:patch-1, r=steveklabnikManish Goregaokar-1/+1
The doc indicates that you can replace 'before' with 'after' showing the use of try!. The two examples should be equivalent, but they are not. In the File::create we were inducing a panic before in case of error, not propagating. It is important for newbies (like myself) to understand that try! propagates failures, while unwrap can induce a panic. The other alternative is to make the 'before' File::create also manually handle Err like the other calls. Either way it would be consistent.
2015-06-09Rollup merge of #25898 - azerupi:patch-3, r=steveklabnikManish Goregaokar-0/+40
As mentioned in #25893 the copy trait is not very well explained for beginners. There is no clear mention that all primitive types implement the copy trait and there are not a lot of examples. With this change I try to make it more visible and understandable for new users. I myself have struggled with this, see [my question on stackoverflow](http://stackoverflow.com/questions/30540419/why-are-booleans-copyable-even-though-the-documentation-doesnt-indicate-that). And I want to make it more transparent for others. I filed issue #25893 but I thought that I could give it a shot myself to relieve some of the work from the devs :) If it is not well written or there are some changes to be made before it can be merged, let me know. Cheers, Mathieu
2015-06-08book: remove a sentence that is not clearTshepang Lekhonkhobe-2/+2
2015-06-08Fixing typo, [[lib]] to [lib]saml-1/+1
Cargo expects `lib` to be table, not an array of tables (only single lib per project).
2015-06-08Updated with requested changesMathieu David-4/+1
2015-06-07Update doctest in comments.mdChuck Bassett-0/+3
For a user following the path of reading Chapter 5: Syntax & Symantics prior to Chapter 4: Learn Rust, this will be the first time they have encountered executable tests inside documentation comments. The test will fail because the `add_one` function is not defined in the context of the doctest. This might not be the optimal place to introduce and explain the `/// #` notation but I think it is important that this snippet pass as a test when `rustdoc --test` is run against it if it is going to be shown.
2015-06-06Auto merge of #26047 - chuckSMASH:patch-1, r=alexcrichtonbors-1/+1
The sensible default used here for the version number in the auto-generated Cargo.toml is 0.1.0, not 0.0.1 (at least as of cargo 0.2.0-nightly efb482d).
2015-06-05Updated Cargo.toml version number outputChuck Bassett-1/+1
The sensible default used here for the version number in the auto-generated Cargo.toml is 0.1.0, not 0.0.1 (at least as of cargo 0.2.0-nightly).
2015-06-05Auto merge of #26032 - achiwhane:master, r=steveklabnikbors-9/+9
Added a sentence that tells the user that using main.rs and/or lib.rs is required for Cargo.
2015-06-05fix some errorsAkshay Chiwhane-2/+2
2015-06-05fix typoAkshay Chiwhane-1/+1
2015-06-05edit for clarity and grammarAkshay Chiwhane-8/+7
2015-06-05Clarified naming convention for CargoAkshay Chiwhane-1/+2
Added a sentence that tells the user that using main.rs and/or lib.rs is required for Cargo.
2015-06-05Rollup merge of #26011 - genodeftest:patch-1, r=steveklabnikSteve Klabnik-3/+3
2015-06-05Rollup merge of #26010 - ranma42:improve-doc, r=steveklabnikSteve Klabnik-1/+1
The statement is not completely exact, because it is valid to have both 0 non-mutable references and 1 mutable reference. Instead, use the same wording as in mutability.md.
2015-06-05Rollup merge of #25925 - azerupi:patch-4, r=steveklabnikSteve Klabnik-0/+42
Hi I added a little section in the for loops about the `enumerate()` function. I think it's useful for beginners to know this function and how you can use it. I used the title loopcounter, but it's probably not the best word to describe it. So let me know if there is a better word :)
2015-06-04[Documentation: Macros] Use some more SSLChristian Stadelmann-3/+3
2015-06-04Minor fix to docs of constraints on mut/non-mut referencesAndrea Canciani-1/+1
The statement is not completely exact, because it is valid to have both 0 non-mutable references and 1 mutable reference. Instead, use the same wording as in mutability.md.
2015-06-02Add note about expression vs. statement to dining philosphers problem,ben fleis-1/+3
to address https://github.com/rust-lang/rust/issues/25488 .
2015-06-02Link to cell in TRPL: mutabilitySteve Klabnik-1/+3
2015-06-02Rollup merge of #25941 - puzza007:trpl-infinite-iterator-chain-take, ↵Manish Goregaokar-1/+1
r=steveklabnik
2015-06-02Rollup merge of #25932 - bluss:doc-book-1, r=alexcrichtonManish Goregaokar-1/+1
trpl: Fix typo in Raw Pointers chapter
2015-06-02booK: Float no longer existsTshepang Lekhonkhobe-1/+1
2015-06-02book: update error messageTshepang Lekhonkhobe-1/+1
2015-06-02book: some tiny improvementsTshepang Lekhonkhobe-13/+13
2015-06-01Added # let lines = "hello\nworld".lines(); to pass the testsMathieu David-0/+1
2015-06-01trpl: Use infinite iterator in chain example with takePaul Oliver-1/+1
2015-06-01Auto merge of #25924 - FuGangqiang:master, r=Gankrobors-2/+2
2015-05-31Auto merge of #25911 - olombard:borrowing-link, r=alexcrichtonbors-1/+1
r? @steveklabnik
2015-05-31output code language to textMathieu David-2/+2
2015-05-31trpl: Fix typo in Raw Pointers chapterUlrik Sverdrup-1/+1
2015-05-31Corrected some formatting issuesMathieu David-5/+11
2015-05-31Update iterators.mdSteve Gury-2/+2
Fix the actual off by one
2015-05-31Fix off by one in the iterator documentationSteve Gury-1/+1
`(1..100).map(|x| x + 1)` is actually mapping [1,100) to [2,101)
2015-05-31Add loopcounter section to the for-loop chapterMathieu David-0/+35
Sometimes loop counters are useful and we should show new users how it is achieved in Rust.
2015-05-31trpl:add missing commaFuGangqiang-2/+2
2015-05-30TRPL: Fix a broken link to 'borrowing'olombard-1/+1
2015-05-30Auto merge of #25882 - steveklabnik:gh25554, r=alexcrichtonbors-2/+6
Fixes #25554
2015-05-30Fixes consistency in before/after examplefrankamp-1/+1
The doc indicates that you can replace 'before' with 'after' showing the use of try!. The two examples should be equivalent, but they are not. In the File::create we were inducing a panic before in case of error, not propagating. It is important for newbies (like myself) to understand that try! propagates failures, while unwrap can induce a panic. The other alternative is to make the 'before' File::create also manually handle Err like the other calls. Either way it would be consistent.
2015-05-30Proposal to explain the copy trait more clearly Mathieu David-0/+43
As mentioned in #25893 the copy trait is not very well explained for beginners. There is no clear mention that all primitive types implement the copy trait and there are not a lot of examples. With this change I try to make it more visible and understandable for new users. I myself have struggled with this, see [my question on stackoverflow](http://stackoverflow.com/questions/30540419/why-are-booleans-copyable-even-though-the-documentation-doesnt-indicate-that). And I want to make it more transparent for others. I filed issue #25893 but I thought that I could give it a shot myself to relieve some of the work from the devs :) If it is not well written or there are some changes to be made before it can be merged, let me know. Cheers, Mathieu
2015-05-29Rollup merge of #25886 - nhowell:patch-1, r=steveklabnikSteve Klabnik-1/+1
r? @steveklabnik
2015-05-29Rollup merge of #25883 - steveklabnik:gh25417, r=alexcrichtonSteve Klabnik-2/+23
Fixes #25417
2015-05-29Rollup merge of #25865 - azerupi:patch-2, r=alexcrichtonSteve Klabnik-1/+1
"workd" corrected to "world"
2015-05-29Rollup merge of #25864 - azerupi:patch-1, r=alexcrichtonSteve Klabnik-1/+1
There was no opening parenthesis for this closing parenthesis...
2015-05-29Rollup merge of #25788 - maxjacobson:add-missing-space-to-glossary, ↵Steve Klabnik-1/+1
r=steveklabnik r? @steveklabnik