summary refs log tree commit diff
path: root/src/doc
AgeCommit message (Collapse)AuthorLines
2017-01-29Minor grammar fix 'can not' -> 'cannot'Wilfred Hughes-3/+3
The previous version suggested that the compiler chooses not to check, rather than being unable to check.
2017-01-27Rollup merge of #39344 - ollie27:links, r=steveklabnikAlex Crichton-1/+1
Fix a few links in the docs r? @steveklabnik
2017-01-27Fix a few links in the docsOliver Middleton-1/+1
2017-01-26drop_in_place is stable now, don't #![feature] it in the nomicon and a testest31-3/+3
It was stable since Rust 1.8.
2017-01-24fix book: refer to `add_two` as "tested function"Raphael Das Gupta-1/+1
rather than "test function", which would be `it_works`
2017-01-23Rollup merge of #39191 - cesarb:book/trait-objects-vtable-size-and-align, ↵Steve Klabnik-4/+1
r=steveklabnik book: size and align in trait object vtables are used The book currently claims that the `size` and `align` fields in the trait object vtable are not used, but this is false. These two fields are used by the stable `mem::size_of_val` and `mem::align_of_val` functions. See the `ty::TyDynamic` case of the `glue::size_and_align_of_dst` function in librustc_trans, which is used to implement both intrinsics in the unsized case. r? @steveklabnik
2017-01-23Rollup merge of #38993 - krdln:patch-1, r=steveklabnikSteve Klabnik-1/+1
Add `&mut expr` to syntax index
2017-01-23Rollup merge of #38956 - theduke:document-field-init-shorthand-38830, ↵Steve Klabnik-2/+3
r=steveklabnik Update struct_expr grammar for field init shorthand. Part of the work for #38830 . r? @steveklabnik
2017-01-23Rollup merge of #38794 - ConnyOnny:master, r=steveklabnikSteve Klabnik-1/+1
book: match enum warning Matching enums with named fields in the previous way yielded the "non_shorthand_field_patterns" warning. The new code shows the shorthand syntax as well as field renaming, so it should be exhaustive ;-)
2017-01-22Fix minor typoEijebong-1/+1
2017-01-20linkchecker: Fix checking links which are just fragmentsOliver Middleton-4/+4
Also fix a typo which linkchecker should have caught.
2017-01-19No need to mention how these fields are usedCesar Eduardo Barros-2/+1
2017-01-19book: size and align in trait object vtables are usedCesar Eduardo Barros-3/+1
The book currently claims that the `size` and `align` fields in the trait object vtable are not used, but this is false. These two fields are used by the stable `mem::size_of_val` and `mem::align_of_val` functions. See the `ty::TyDynamic` case of the `glue::size_and_align_of_dst` function in librustc_trans, which is used to implement both intrinsics in the unsized case.
2017-01-15An update to patterns documentationBjorn Tipling-0/+27
As it is written it creates a lot of confusion.
2017-01-13Rollup merge of #39027 - behnam:typo, r=frewsxcvGuillaume Gomez-1/+1
[libcollections] [doc] Fix typo in documentation Replace two instances of `an raw` with `a raw` in documentation blocks.
2017-01-12[libcollections] [doc] Fix typo in documentationBehnam Esfahbod-1/+1
2017-01-11Fix some typos in NomiconBen Wiederhake-2/+2
2017-01-11Add `&mut expr` to syntax indexkrdln-1/+1
2017-01-10Update struct_expr grammar for field init shorthand.theduke-2/+3
2017-01-10Rollup merge of #38816 - Manishearth:coercion-doc, r=GuillaumeGomezSeo Sanghyeon-1/+3
Add more docs for CoerceUnsized and Unsize here be dragons r? @ubsan @steveklabnik
2017-01-10Auto merge of #38138 - rkruppe:no_std-no_loop, r=steveklabnikbors-11/+10
book: use abort() over loop {} for panic Due to #28728 `loop {}` is very risky and can lead to fun debugging experiences such as #38136. Besides, aborting is probably better behavior than an infinite loop. r? @steveklabnik
2017-01-04book: use abort() over loop {} for panicRobin Kruppe-11/+10
Due to #28728 loop {} is very risky and can lead to fun debugging experiences like in #38136. Besides, aborting is probably better behavior than an infinite loop.
2017-01-04Document custom derive.Steve Klabnik-8/+256
These are some bare-bones documentation for custom derive, needed to stabilize "macros 1.1", https://github.com/rust-lang/rust/issues/35900 The book chapter is based off of a blog post by @cbreeden, https://cbreeden.github.io/Macros11/ Normally, we have a policy of not mentioning external crates in documentation. However, given that syn/quote are basically neccesary for properly using macros 1.1, I feel that not including them here would make the documentation very bad. So the rules should be bent in this instance.
2017-01-04Add more docs for CoerceUnsized and UnsizeManish Goregaokar-1/+3
2017-01-03Auto merge of #38066 - bluss:string-slice-error, r=sfacklerbors-2/+2
Use more specific panic message for &str slicing errors Separate out of bounds errors from character boundary errors, and print more details for character boundary errors. It reports the first error it finds in: 1. begin out of bounds 2. end out of bounds 3. begin <= end violated 3. begin not char boundary 5. end not char boundary. Example: &"abcαβγ"[..4] thread 'str::test_slice_fail_boundary_1' panicked at 'byte index 4 is not a char boundary; it is inside 'α' (bytes 3..5) of `abcαβγ`' Fixes #38052
2017-01-03book: match enum warning removedConstantin-1/+1
Matching enums with named fields in the previous way yielded the "non_shorthand_field_patterns" warning. The new code shows the shorthand syntax as well as field renaming, so it should be exhaustive ;-)
2017-01-02Reword 'stupid' and 'crazy' in docs.Clar Charr-10/+10
2016-12-29Rollup merge of #38662 - agl:patch-2, r=frewsxcvAlex Crichton-2/+2
Use "an" before "i32" (Minor typo fix.) Since the word `i32` starts with a vowel, the indefinite article should use "an", not "a" \[[1](http://www.dictionary.com/browse/an)\]. (Previously there was one instance of "an i32" and two instances of "a i32", so at least something is wrong!) Since I believe that "an" is the correct form, I aligned everything with that.
2016-12-29Rollup merge of #38659 - agl:patch-1, r=apasel422Alex Crichton-1/+1
Add missing apostrophe. (Minor typo fix.) The "support" in this case is possessed by the "programmer", and that ownership should be indicated by an apostrophe.
2016-12-29Rollup merge of #38630 - frewsxcv:variadic, r=steveklabnikAlex Crichton-0/+34
Document foreign variadic functions in TRPL and the reference. Fixes https://github.com/rust-lang/rust/issues/38485.
2016-12-28Use "an" before "i32"Adam Langley-2/+2
(Minor typo fix.) Since the word `i32` starts with a vowel, the indefinite article should use "an", not "a" \[[1](http://www.dictionary.com/browse/an)\]. (Previously there was one instance of "an i32" and two instances of "a i32", so at least something is wrong!) Since I believe that "an" is the correct form, I aligned everything with that.
2016-12-28Add missing apostrophe.Adam Langley-1/+1
(Minor typo fix.) The "support" in this case is possessed by the "programmer", and that ownership should be indicated by an apostrophe.
2016-12-27Document foreign variadic functions in TRPL and the reference.Corey Farwell-0/+34
Fixes https://github.com/rust-lang/rust/issues/38485.
2016-12-27And suddenly a german word :Okellerkindt-1/+1
"verboten" is german for "forbidden"
2016-12-24Rollup merge of #38568 - chris-morgan:fix-markdown-lists, r=frewsxcvSteve Klabnik-9/+9
Fix Markdown list formatting. The Markdown engine used by the book can cope with a single leading space on the list marker: Like this: * List item Rather than like this: * List item … but it’s not the typical convention employed in the book, and moreover the Markdown engine used for producing the error index *can’t* cope with it (its behaviour looks like a bug, as it appears to lose one of the two line breaks as well, but that’s immaterial here). So, we shift to a single convention which doesn’t trigger bugs in the Markdown renderer. ---- See https://doc.rust-lang.org/error-index.html#E0458 and https://doc.rust-lang.org/error-index.html#E0101 for the bad current rendering in the error index.
2016-12-24Rollup merge of #38013 - wezm:simplify-test-notes, r=steveklabnikSteve Klabnik-5/+4
Simplify notes on testing and concurrency The start of the notes on tests running concurrently, added in https://github.com/rust-lang/rust/pull/37766 read a little awkwardly. This PR fixes that and simplifies the wording a bit. r? @steveklabnik
2016-12-24Rollup merge of #37956 - tshepang:patch-2, r=steveklabnikSteve Klabnik-2/+3
book: replace example I do not understand
2016-12-23book: replace example I do not understandTshepang Lekhonkhobe-2/+3
2016-12-22Fix Markdown list formatting.Chris Morgan-9/+9
The Markdown engine used by the book can cope with a single leading space on the list marker: Like this: * List item Rather than like this: * List item … but it’s not the typical convention employed in the book, and moreover the Markdown engine used for producing the error index *can’t* cope with it (its behaviour looks like a bug, as it appears to lose one of the two line breaks as well, but that’s immaterial here). So, we shift to a single convention which doesn’t trigger bugs in the Markdown renderer.
2016-12-20Rollup merge of #38215 - liigo:patch-12, r=petrochenkovAlex Crichton-1/+2
minor fix about visibility in reference
2016-12-16Update book for rustupBrian Anderson-9/+23
2016-12-16Book: rustup.sh -> rustup.rsSteve Klabnik-21/+7
Fixes #35653 cc https://github.com/rust-lang/rust-www/pull/621
2016-12-13Associated items and variants inherit visibility from their traits and enums ↵Liigo-1/+1
respectively.
2016-12-13minor fix about visibility in referenceLiigo Zhuang-1/+2
2016-12-13Simplify notes on testing and concurrencyWesley Moore-5/+4
2016-12-12Rollup merge of #38164 - sourcefrog:fonts, r=GuillaumeGomezCorey Farwell-1/+3
Avoid using locally installed Source Code Pro font (fixes #24355). In some versions of this font the ampersands are drawn badly. A doc tree built with this change is at https://storage.googleapis.com/mbp-rust-builds/fonts/doc/std/index.html I'm not seeing this problem locally so I'm not sure this fixes it, but based on the diagnosis in the bug it should. I've made this a minimal change by only removing the one problematic font but maybe for consistency every font should be read from the Rust docs tree?
2016-12-07Rollup merge of #38225 - Cobrand:patch-1, r=GuillaumeGomezGuillaume Gomez-9/+14
Update book/ffi to use catch_unwind r? @GuillaumeGomez The doc mentioned to spawn a new thread instead of using catch_unwind, which has been the recommended way to catch panics for foreign function interfaces for a few releases now. This commit fixes that.
2016-12-07Rollup merge of #38163 - durka:patch-33, r=blussGuillaume Gomez-1/+2
reference: fix definition of :tt The reference says that $x:tt matches "either side of the `=>` in macro_rules` which is technically true but completely uninformative. This changes that bullet point to what the book says (a single token or sequence of token trees inside brackets).
2016-12-07Update book/ffi to use catch_unwindCobrand-9/+14
r? @GuillaumeGomez The doc mentioned to spawn a new thread instead of using catch_unwind, which has been the recommended way to catch panics for foreign function interfaces for a few releases now.
2016-12-04Avoid using locally installed Source Code Pro font (fixes #24355).Martin Pool-1/+3
In some versions of this font the ampersands are drawn badly.