Commit Graph

56 Commits

Author SHA1 Message Date
Giles Cope bc1b2d5017 Some keyword documentation. 2019-12-29 08:19:33 +00:00
Mark Rousskov a06baa56b9 Format the world 2019-12-22 17:42:47 -05:00
Mazdak Farrokhzad 56f830e292 Rollup merge of #66325 - BartMassey:master, r=joshtriplett
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-08 03:39:43 +01:00
Devin R e638f7c1ab add grammer fixes 2019-12-01 19:47:54 -05:00
Devin R 7c3befc7f9 add ";" for let = match 2019-11-30 18:02:19 -05:00
Devin R c69be483d6 fix doc compile fail 2019-11-30 17:32:49 -05:00
Devin R d5a4c6253d remove trailing whitespace 2019-11-30 10:24:04 -05:00
Devin R 44f3bee17f add docs for move and match keywords 2019-11-30 09:05:46 -05:00
Devin R b67d6c7e12 add example to move 2019-11-30 08:57:33 -05:00
Devin R 71abce1e5d document match and move keywords 2019-11-30 08:54:39 -05:00
Magnus Ulimoen e85f40cbd2 add missing 'static lifetime in docs
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-16 08:40:35 +01:00
Bart Massey ed56f86781 Cleaned up unused labels
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-11-15 16:31:30 -08:00
Yves Dorfsman 9733b0f122 Adding doc on keyword continue 2019-10-24 21:35:16 -06:00
Yves Dorfsman 11214a6312 reworded loop value sentence 2019-10-18 19:49:09 -06:00
Yves Dorfsman 52c771377f Added doc on keyword break 2019-10-18 06:55:51 -06:00
Mazdak Farrokhzad c96a677c39 Rollup merge of #62957 - dns2utf8:doc_loop_keyword, r=GuillaumeGomez
Match the loop examples

The idea is to show the usefulness of the expression side by side.
2019-08-30 23:07:57 +02:00
Mazdak Farrokhzad b0d4782948 Stabilize 'async_await'. 2019-08-20 02:38:02 +02:00
Stefan Schindler ae1e7cace3 Match the loop examples 2019-08-06 10:48:11 +02:00
Nathan Goldbaum d4fcbb4bdb document that crate refers to the project root 2019-07-11 14:25:53 -04:00
Yuki Okushi 559c3ec562 Document while keyword 2019-07-07 22:17:26 +09:00
Dylan MacKenzie 851be33f2a Add all keywords to keyword docs
This commit gives each stable keyword a short entry in the "Keywords"
section in the docs for `std`. The newly added entries are a single
summary line and a note that the documentation is not yet complete.  I
changed some of the existing summary lines for consistency's sake. Each
line is either a verb phrase ("name the type of a trait object" for
`dyn`), or an object ("A value of type `bool` representing logical true"
for `true`). I tried to avoid using the keyword itself or the word
"keyword" in the summary.

Later PRs can flesh out each keyword with an example of each
context in which a keyword can appear and a link to the rust book.

Keywords which are not close to stable rust such as `box` (which is
getting unstabilized) or `try` are ignored in this PR.
2019-05-16 14:46:33 -07:00
Eric Huss 1ad46cd1ed Fix links on keyword docs.
- Make links relative.
- Adjust links from old 2018-edition book.
- Fix broken link in `let` docs.
2019-04-09 15:38:32 -07:00
Chris Gregory 25452501ee Move link to rust book to next line to pass 100 column limit 2019-03-27 21:46:25 -04:00
Chris Gregory f0a7610724 Add higher-ranked trait bounds link 2019-03-27 12:03:14 -04:00
Chris Gregory 65b5e57226 Make into itemized list and fix some wording 2019-03-27 01:52:55 -04:00
Chris Gregory a68a0e33d1 Add documentation about for used as higher ranked trait bounds
Resolves #55416
2019-03-27 01:23:14 -04:00
Alexander Regueiro 99ed06eb88 libs: doc comments 2019-02-10 23:57:25 +00:00
Alexander Regueiro b87363e763 tests: doc comments 2019-02-10 23:42:32 +00:00
kennytm e1a1ab0836 Rollup merge of #57312 - Mendess2526:master, r=Centril
`const fn` is no longer coming soon (const keyword docs)

The `const` keyword [documentation](https://doc.rust-lang.org/std/keyword.const.html) mentions that `const fn`s are coming soon, but they have already been added.
2019-01-05 23:56:56 +08:00
Mendess2526 3fb42cfb7c const fn no longer comming soon on const docs 2019-01-03 19:23:25 +00:00
Corey Farwell d2c91a1a6d Fix broken links to second edition TRPL.
Fixes https://github.com/rust-lang/rust/issues/57104.
2019-01-01 12:53:07 -05:00
Mark Rousskov 2a663555dd Remove licenses 2018-12-25 21:08:33 -07:00
Alexander Regueiro ee89c088b0 Various minor/cosmetic improvements to code 2018-12-07 23:53:34 +00:00
ljedrz 8c4129cd9a cleanup: remove static lifetimes from consts in libstd 2018-12-04 10:21:42 +01:00
Andy Russell 4e35cbb22e fix various typos in doc comments 2018-11-13 14:45:31 -05:00
iirelu 320ec8137e Hopefully fix compile error
This was added in the fortnight this PR spent stale. I'm hoping this
one-liner fixes it.
2018-10-23 22:27:02 +02:00
iirelu 619dfeb514 Remove the last broken link.
Dangit. I really thought I got them all.
2018-09-26 18:37:46 +02:00
iirelu 577dbc8519 Incorporate criticisms into keyword docs
Thanks to @Centril for these.
2018-09-26 17:06:11 +02:00
iirelu 50f631ce80 Removed dead links to unwritten keyword docs
Most of these will eventually be filled, but right now travis-ci enjoys
complaining about the fact that there's links that lead nowhere, so
they're gone. Hopefully someone remembers to re-add them later.
2018-09-26 16:52:47 +02:00
iirelu 76a353b160 Add keyword docs for loop. 2018-09-24 16:42:43 +02:00
iirelu 165690b7db Rework let keyword docs
It didn't strictly need to be reworked and I'm not sure my version is
better, but oh well, I'm doing it for consistency.
2018-09-19 18:08:22 +02:00
iirelu 738e58d57e Document impl keyword
This commit also splits out linky-line-thingies into two lines, which
judging from the source code for tidy, should be enough to make it shut
up and accept me for who I am, dammit.
2018-09-19 17:01:07 +02:00
iirelu 5393b277aa Incorporate keyword doc PR critique 2018-09-14 14:40:26 +02:00
iirelu 5d05ae7235 Document if keyword. 2018-09-12 16:43:13 +02:00
iirelu f7a66388f3 Document for keyword 2018-09-10 19:36:27 +02:00
iirelu a5c4a382b7 Expand fn keyword docs 2018-09-09 15:44:59 +02:00
iirelu f91ad440ef Add docs on extern keyword 2018-09-09 13:23:34 +02:00
iirelu f15a1ec45d Add keyword docs on enum 2018-09-06 20:44:29 +02:00
iirelu f8d6261f9b Add docs for crate keyword
I think it might be used in some other things, but I'm not fluent enough
at sifting through the rust compiler's source code to find every use of
a specific keyword.

This leaves the question of how to document the `extern` keyword, what
with how much overlap it has with `crate`, but that's used with ABI
stuff so that should be fine.
2018-09-05 19:12:20 +02:00
iirelu 6cbcfa2761 Fix a few small things, re-word others
Mostly addressing notes on ambiguous syntax and spurious newlines.
2018-09-03 21:56:30 +02:00