summary refs log tree commit diff
path: root/src/libstd/keyword_docs.rs
AgeCommit message (Collapse)AuthorLines
2020-07-13Rollup merge of #73867 - poliorcetics:union-keyword, r=joshtriplettManish Goregaokar-2/+66
Document the union keyword Partial fix of #34601. This documents the `union` keyword by presenting three cases: simply using a union, matching on a union and referencing the fields of a union. @rustbot modify labels: T-doc,C-enhancement
2020-07-01Rollup merge of #73805 - poliorcetics:type-keyword, r=kennytmManish Goregaokar-2/+37
Document the type keyword Partial fix of #34601. Two small examples, one clarifying that `type` only defines an alias, not a completely new type, the other explaining the use in traits. @rustbot modify labels: T-doc,C-enhancement
2020-07-01Rollup merge of #73716 - poliorcetics:static-keyword, r=LukasKalbertodtManish Goregaokar-3/+76
Document the static keyword Partial fix of #34601. This documents the `static` keyword. It's basically a simplified version of the reference with more examples. @rustbot modify labels: T-doc,C-enhancement
2020-06-30Clarify some parts by applying the suggestions from reviewPoliorcetics-6/+7
Co-authored-by: Josh Triplett <josh@joshtriplett.org>
2020-06-29Document the union keywordAlexis Bourget-2/+65
2020-06-28Fix small nitsAlexis Bourget-4/+3
2020-06-28Apply suggestions, reformulating some paragraphs and improving some examplesAlexis Bourget-38/+36
2020-06-28Apply suggestions from code reviewAlexis Bourget-2/+13
2020-06-27Document the type keywordAlexis Bourget-2/+26
2020-06-26Rollup merge of #73718 - poliorcetics:super-keyword, r=shepmasterManish Goregaokar-2/+18
Document the super keyword Partial fix of #34601. Quite short, just a small example and a link to the reference. @rustbot modify labels: T-doc,C-enhancement
2020-06-26Rollup merge of #73694 - poliorcetics:self-upper-keyword, r=Mark-SimulacrumManish Goregaokar-2/+57
Document the Self keyword Partial fix of #34601. Document the `Self` keyword. This contains simple examples of the places where `Self` can be used.
2020-06-25Rollup merge of #73648 - poliorcetics:return-keyword, r=joshtriplettManish Goregaokar-2/+48
Document the return keyword Partial fix of #34601. This documents the `return` keyword with two short example to explain it is not needed for the last expression in a function and a long example to show its use when interrupting a function execution early. I did not put a link to the reference since the only link I found was https://doc.rust-lang.org/stable/reference/expressions/return-expr.html#return-expressions. @rustbot modify labels: T-doc,C-enhancement
2020-06-25Rollup merge of #73621 - poliorcetics:mut-keyword, r=steveklabnikManish Goregaokar-3/+53
Document the mut keyword Partial fix for #34601. Documentation for the `mut` keyword. I think it's okay for it to be quite short, this is not the book not the reference, but if you find something is missing, do not hesitate to tell me.
2020-06-25Rollup merge of #73619 - poliorcetics:mod-keyword, r=steveklabnikManish Goregaokar-2/+20
Document the mod keyword Partial fix for #34601 . Documentation for the `mod` keyword.
2020-06-25Document the static keywordAlexis Bourget-2/+78
2020-06-25Document the super keywordAlexis Bourget-2/+18
2020-06-25Add a compile fail example, binding -> variable, apply suggestionsAlexis Bourget-13/+22
2020-06-24Document the Self keywordAlexis Bourget-2/+57
2020-06-24Document the self keywordAlexis Bourget-2/+86
2020-06-24Document the return keywordAlexis Bourget-2/+48
Apply suggestions from code review Co-authored-by: Josh Triplett <josh@joshtriplett.org>
2020-06-22Document the mut keywordAlexis Bourget-2/+43
2020-06-22Document the mod keywordAlexis Bourget-2/+20
2020-05-30Remove the fn main() in code examplePoliorcetics-3/+1
2020-05-30Apply suggestions from code review Poliorcetics-2/+2
Fix suggestions from review. Co-authored-by: Bastian Kauschke <bastian_kauschke@hotmail.de>
2020-05-29Added the documentation for the 'use' keywordAlexis Bourget-2/+56
2020-04-24Fix typos in docs for keyword "in"Jubilee Young-2/+2
2020-03-18Rollup merge of #67749 - gilescope:keyword-in, r=Dylan-DPCMazdak Farrokhzad-5/+56
keyword docs for else and inkeyword docs for else and in. First cut of else and in keyword docs. Comments and suggestions more than welcome.
2020-03-13Add documentation for pub keywordsjud-2/+8
2020-02-28docs: add mention of async blocks in move keyword docsPulkit Goyal-0/+9
Fixes #69298
2020-02-13keyword docs for else and inkeyword docs for else and in.Giles Cope-5/+56
2020-02-12Rollup merge of #67695 - gilescope:truth, r=centrilYuki Okushi-5/+44
Added dyn and true keyword docs r? @Centril
2020-02-11Keyword docsGiles Cope-5/+44
Co-Authored-By: Mazdak Farrokhzad <twingoow@gmail.com> Co-Authored-By: Tim Robinson <tim.g.robinson@gmail.com> Co-Authored-By: Peter Todd <pete@petertodd.org> Co-Authored-By: Dylan DPC <dylan.dpc@gmail.com>
2019-12-29Some keyword documentation.Giles Cope-4/+23
2019-12-22Format the worldMark Rousskov-39/+39
2019-12-08Rollup merge of #66325 - BartMassey:master, r=joshtriplettMazdak Farrokhzad-2/+2
Change unused_labels from allow to warn Fixes #66324, making the unused_labels lint warn instead of allow by default. I'm told @rust-lang/lang will need to review this, and perhaps will want to do a crater run.
2019-12-01add grammer fixesDevin R-2/+2
2019-11-30add ";" for let = matchDevin R-1/+1
2019-11-30fix doc compile failDevin R-4/+5
2019-11-30remove trailing whitespaceDevin R-15/+15
2019-11-30add docs for move and match keywordsDevin R-2/+5
2019-11-30add example to moveDevin R-1/+4
2019-11-30document match and move keywordsDevin R-5/+64
2019-11-16add missing 'static lifetime in docsMagnus Ulimoen-1/+1
The example refers to a static lifetime parameter that can be elided. This parameter is not included, meaning lifetime elision is not shown.
2019-11-15Cleaned up unused labelsBart Massey-2/+2
Deleted unused labels from compiler and fixed or allowed unused labels in tests. This patch removes some gratuitous unused labels and turns off the warning for unused labels that are a necessary part of tests. This will permit setting the `unused_labels` lint to `warn`.
2019-10-24Adding doc on keyword continueYves Dorfsman-2/+33
2019-10-18reworded loop value sentenceYves Dorfsman-2/+3
2019-10-18Added doc on keyword breakYves Dorfsman-2/+64
2019-08-30Rollup merge of #62957 - dns2utf8:doc_loop_keyword, r=GuillaumeGomezMazdak Farrokhzad-3/+4
Match the loop examples The idea is to show the usefulness of the expression side by side.
2019-08-20Stabilize 'async_await'.Mazdak Farrokhzad-2/+0
2019-08-06Match the loop examplesStefan Schindler-3/+4