Commit Graph

78 Commits

Author SHA1 Message Date
Steve Klabnik d7b3f5c6ae update various stdlib docs 2018-11-21 06:50:17 -05:00
Pietro Albini f740b8a4de Rollup merge of #55247 - peterjoel:peterjoel-prim-char-doc-example, r=joshtriplett
Clarified code example in char primitive doc

The example was not as clear as it could be because it was making an assumption about the structure of the data in order to multiply the number of elements in the slice by the item size. This change demonstrates the idea more straightforwardly, without needing a calculation, by just comparing the size of the slices.
2018-10-25 14:31:07 +02:00
Peter Hall 0f6e2741f6 Clarified code example
The example was not as clear as it could be because it was making an assumption about the structure of the data in order to multiply the number of collection elements by the item size. This change demonstrates the idea more straightforwardly, without the calculation.
2018-10-21 18:53:09 +01:00
Lucas Lois 68236e088d Cleans trailing whitespace 2018-10-02 13:59:33 -03:00
Lucas Lois 74bf59ea03 Documents reference equality by address (#54197)
Clarification of the use of `ptr::eq` to test equality of references
via address by pointer coercion
2018-10-02 13:31:40 -03:00
gardrek 1b9da67811 Fixed three small typos. 2018-09-23 23:47:52 -05:00
QuietMisdreavus dda7e0dec6 re-mark the never docs as unstable 2018-09-13 17:31:56 -05:00
Michael Lamparski b8eb91a5ad make std::str link into See also link
also make a drive-by typo fix
2018-05-09 18:30:32 -04:00
Michael Lamparski 8010604b2d move See also links to top 2018-05-09 18:30:32 -04:00
kennytm bb690c600c Rollup merge of #49988 - clarcharr:never_docs, r=steveklabnik
Mention Result<!, E> in never docs.

Fixes #48096.
2018-05-09 17:25:04 +08:00
Clar Charr fc6d6c98de Fixed typos 2018-05-05 00:18:10 -04:00
bors bbdd1cf744 Auto merge of #49757 - GuillaumeGomez:never-search, r=QuietMisdreavus
Add specific never search

Fixes #49529.

r? @QuietMisdreavus
2018-04-22 02:18:41 +00:00
Guillaume Gomez 84b91d6f5c add more aliases 2018-04-21 22:02:53 +02:00
Guillaume Gomez 57bcabc108 Generate alias file 2018-04-21 22:02:53 +02:00
kennytm 42b6d4653a Add back missing #![feature(never_type)]s 2018-04-21 15:18:13 +08:00
Clar Charr 20a795e6c6 Mention Result<!, E> in never docs. 2018-04-15 17:43:20 -04:00
Mark Mansi 07104692d5 Fix missed i128 feature gates 2018-03-26 08:37:56 -05:00
Andrew Cann a9fc3901b0 stabilise feature(never_type)
Replace feature(never_type) with feature(exhaustive_patterns).
feature(exhaustive_patterns) only covers the pattern-exhaustives checks
that used to be covered by feature(never_type)
2018-03-14 12:44:51 +08:00
Guillaume Gomez 9931583468 Make primitive types docs relevant 2018-02-11 21:53:30 -05:00
Andrew Cann b9df045b79 Rename never_type_impls gate to never_type 2017-12-12 14:03:03 +08:00
Andrew Cann 172f16bc9d Update never_type docs based on feedback 2017-12-10 15:13:55 +08:00
Andrew Cann a2e79a7e52 Add more links to ! doc text 2017-11-28 23:20:43 +08:00
Andrew Cann bd7d541dbd Fix doc tests 2017-11-24 16:51:00 +08:00
Andrew Cann 31845201e8 change stability of prim_never 2017-11-24 13:16:39 +08:00
Andrew Cann 6612590bd1 Add docs for never primitive 2017-11-24 11:23:11 +08:00
Konrad Borowski 8528508aa0 Update array documentation for Clone trait changes 2017-10-17 08:29:29 +02:00
Havvy 548686ff12 Document stable size_of primitives and pointer size guarantees 2017-09-20 21:11:03 -07:00
Nathaniel Ringo c987f30049 Mention null_mut on the pointer primitive docs.
Also adds a few mentions that both `*const` and `*mut` support
functions, when only `*const` was mentioned before.
2017-08-22 12:00:05 -05:00
Corey Farwell 1065ad418e Minor rewrite of char primitive unicode intro.
Opened primarily to address #36998.
2017-08-17 00:36:30 -04:00
Bastien Orivel 3ab86fbab2 Fix some typos 2017-08-12 14:01:11 +02:00
QuietMisdreavus 71751db491 add documentation for function pointers as a primitive 2017-08-01 09:42:12 -05:00
QuietMisdreavus a2d5514693 add docs for references as a primitive 2017-07-30 14:59:08 -05:00
kennytm 4711982314 Removed as many "```ignore" as possible.
Replaced by adding extra imports, adding hidden code (`# ...`), modifying
examples to be runnable (sorry Homura), specifying non-Rust code, and
converting to should_panic, no_run, or compile_fail.

Remaining "```ignore"s received an explanation why they are being ignored.
2017-06-23 15:31:53 +08:00
Tim Neumann d4d35cfecc Rollup merge of #41243 - projektir:prim_str_docs, r=GuillaumeGomez
Minor nits in primitive str

Some minor updates to linking, added some links, doc format, etc.

r? @GuillaumeGomez
2017-04-12 14:45:48 +02:00
projektir ed7b6c3724 Minor nits in primitive str 2017-04-12 00:10:36 -04:00
Nathaniel Ringo b9d662a000 Fixes incorrect formatting in array's documentation. 2017-04-10 16:12:39 -05:00
Corey Farwell efc2ae8e59 Rollup merge of #40703 - GuillaumeGomez:pointer-docs, r=steveklabnik
Add missing urls in ptr docs

r? @rust-lang/docs
2017-03-31 16:48:24 -04:00
Guillaume Gomez 27151017e9 Add missing urls in ptr docs 2017-03-21 16:23:27 +01:00
steveklabnik d1d9626e75 Fix up various links
The unstable book, libstd, libcore, and liballoc all needed some
adjustment.
2017-03-20 10:10:16 -04:00
Corey Farwell e7b0f2badf Remove function invokation parens from documentation links.
This was never established as a convention we should follow in the 'More
API Documentation Conventions' RFC:

https://github.com/rust-lang/rfcs/blob/master/text/1574-more-api-documentation-conventions.md
2017-03-13 21:43:18 -04:00
Steve Klabnik b4cd3d9206 Revert "Fix up links"
This reverts commit 7f1d1c6d9a.

The original commit was created because mdBook and rustdoc had
different generation algorithms for header links; now with
https://github.com/rust-lang/rust/pull/39966 , the algorithms
are the same. So let's undo this change.

... when I came across this problem, I said "eh, this isn't fun,
but it doesn't take that long." I probably should have just actually
taken the time to fix upstream, given that they were amenable. Oh
well!
2017-02-20 09:09:12 -05:00
Steve Klabnik 7f1d1c6d9a Fix up links
mdbook and rustdoc generate links differently, so we need to change all
these links.
2017-02-13 13:41:24 -05:00
Guillaume Gomez c8d1f322ca Add missing urls for array docs 2017-01-24 21:16:41 +01:00
Guillaume Gomez b09305edb9 Specify the result of integer cast on boolean 2017-01-21 12:35:43 +01:00
Oliver Middleton f48f3d7584 rustdoc: Give primitive types stability attributes
This is especially important for i128/u128 to make it clear they are
unstable in the docs.
2017-01-15 09:08:29 +00:00
Oliver Middleton 8d076ce0a6 Fix typo in tuple docs 2017-01-05 01:16:37 +00:00
est31 85ec09187c Make rustdoc aware of the primitive i128 type
Many thanks to ollie27 for spotting all the places.
2016-12-30 15:17:27 +01:00
Tobias Bucher 717d2ddca7 Use less size_t casts in libstd since it's now defined as usize 2016-10-08 15:48:28 +02:00
Keegan McAllister 54c680cdb1 Tweak array docs
Fixes #29331.
2016-09-11 12:36:24 -07:00
Nick Cameron e6cc4c5d13 Fix links 2016-08-18 15:43:35 +12:00