about summary refs log tree commit diff
path: root/src/libstd/primitive_docs.rs
AgeCommit message (Collapse)AuthorLines
2019-03-31libstd: deny(elided_lifetimes_in_paths)Mazdak Farrokhzad-2/+2
2019-02-10libs: doc commentsAlexander Regueiro-1/+1
2019-02-10tests: doc commentsAlexander Regueiro-1/+1
2019-01-09actually take a slice in this exampleSteve Klabnik-3/+2
Fixes #45678
2019-01-01Fix broken links to second edition TRPL.Corey Farwell-1/+1
Fixes https://github.com/rust-lang/rust/issues/57104.
2018-12-27Fix span in char documentationEsteban Küber-1/+1
2018-12-25Remove licensesMark Rousskov-10/+0
2018-12-11std: Depend directly on crates.io cratesAlex Crichton-1/+1
Ever since we added a Cargo-based build system for the compiler the standard library has always been a little special, it's never been able to depend on crates.io crates for runtime dependencies. This has been a result of various limitations, namely that Cargo doesn't understand that crates from crates.io depend on libcore, so Cargo tries to build crates before libcore is finished. I had an idea this afternoon, however, which lifts the strategy from #52919 to directly depend on crates.io crates from the standard library. After all is said and done this removes a whopping three submodules that we need to manage! The basic idea here is that for any crate `std` depends on it adds an *optional* dependency on an empty crate on crates.io, in this case named `rustc-std-workspace-core`. This crate is overridden via `[patch]` in this repository to point to a local crate we write, and *that* has a `path` dependency on libcore. Note that all `no_std` crates also depend on `compiler_builtins`, but if we're not using submodules we can publish `compiler_builtins` to crates.io and all crates can depend on it anyway! The basic strategy then looks like: * The standard library (or some transitive dep) decides to depend on a crate `foo`. * The standard library adds ```toml [dependencies] foo = { version = "0.1", features = ['rustc-dep-of-std'] } ``` * The crate `foo` has an optional dependency on `rustc-std-workspace-core` * The crate `foo` has an optional dependency on `compiler_builtins` * The crate `foo` has a feature `rustc-dep-of-std` which activates these crates and any other necessary infrastructure in the crate. A sample commit for `dlmalloc` [turns out to be quite simple][commit]. After that all `no_std` crates should largely build "as is" and still be publishable on crates.io! Notably they should be able to continue to use stable Rust if necessary, since the `rename-dependency` feature of Cargo is soon stabilizing. As a proof of concept, this commit removes the `dlmalloc`, `libcompiler_builtins`, and `libc` submodules from this repository. Long thorns in our side these are now gone for good and we can directly depend on crates.io! It's hoped that in the long term we can bring in other crates as necessary, but for now this is largely intended to simply make it easier to manage these crates and remove submodules. This should be a transparent non-breaking change for all users, but one possible stickler is that this almost for sure breaks out-of-tree `std`-building tools like `xargo` and `cargo-xbuild`. I think it should be relatively easy to get them working, however, as all that's needed is an entry in the `[patch]` section used to build the standard library. Hopefully we can work with these tools to solve this problem! [commit]: https://github.com/alexcrichton/dlmalloc-rs/commit/28ee12db813a3b650a7c25d1c36d2c17dcb88ae3
2018-12-07Various minor/cosmetic improvements to codeAlexander Regueiro-1/+1
2018-11-21update various stdlib docsSteve Klabnik-3/+2
2018-10-25Rollup merge of #55247 - peterjoel:peterjoel-prim-char-doc-example, ↵Pietro Albini-2/+2
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-21Clarified code examplePeter Hall-2/+2
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-02Cleans trailing whitespaceLucas Lois-5/+5
2018-10-02Documents reference equality by address (#54197)Lucas Lois-0/+25
Clarification of the use of `ptr::eq` to test equality of references via address by pointer coercion
2018-09-23Fixed three small typos.gardrek-3/+3
2018-09-13re-mark the never docs as unstableQuietMisdreavus-0/+1
2018-05-09make std::str link into See also linkMichael Lamparski-5/+3
also make a drive-by typo fix
2018-05-09move See also links to topMichael Lamparski-8/+8
2018-05-09Rollup merge of #49988 - clarcharr:never_docs, r=steveklabnikkennytm-0/+53
Mention Result<!, E> in never docs. Fixes #48096.
2018-05-05Fixed typosClar Charr-6/+7
2018-04-22Auto merge of #49757 - GuillaumeGomez:never-search, r=QuietMisdreavusbors-0/+10
Add specific never search Fixes #49529. r? @QuietMisdreavus
2018-04-21add more aliasesGuillaume Gomez-0/+7
2018-04-21Generate alias fileGuillaume Gomez-0/+3
2018-04-21Add back missing `#![feature(never_type)]`skennytm-0/+2
2018-04-15Mention Result<!, E> in never docs.Clar Charr-0/+52
2018-03-26Fix missed i128 feature gatesMark Mansi-2/+2
2018-03-14stabilise feature(never_type)Andrew Cann-6/+5
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-02-11Make primitive types docs relevantGuillaume Gomez-48/+0
2017-12-12Rename never_type_impls gate to never_typeAndrew Cann-1/+1
2017-12-10Update never_type docs based on feedbackAndrew Cann-1/+2
2017-11-28Add more links to `!` doc textAndrew Cann-18/+28
2017-11-24Fix doc testsAndrew Cann-9/+22
2017-11-24change stability of prim_neverAndrew Cann-1/+1
2017-11-24Add docs for never primitiveAndrew Cann-0/+104
2017-10-17Update array documentation for Clone trait changesKonrad Borowski-3/+4
2017-09-20Document stable size_of primitives and pointer size guaranteesHavvy-0/+8
2017-08-22Mention null_mut on the pointer primitive docs.Nathaniel Ringo-3/+5
Also adds a few mentions that both `*const` and `*mut` support functions, when only `*const` was mentioned before.
2017-08-17Minor rewrite of char primitive unicode intro.Corey Farwell-13/+18
Opened primarily to address #36998.
2017-08-12Fix some typosBastien Orivel-1/+1
2017-08-01add documentation for function pointers as a primitiveQuietMisdreavus-0/+101
2017-07-30add docs for references as a primitiveQuietMisdreavus-0/+117
2017-06-23Removed as many "```ignore" as possible.kennytm-2/+4
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-04-12Rollup merge of #41243 - projektir:prim_str_docs, r=GuillaumeGomezTim Neumann-4/+4
Minor nits in primitive str Some minor updates to linking, added some links, doc format, etc. r? @GuillaumeGomez
2017-04-12Minor nits in primitive strprojektir-4/+4
2017-04-10Fixes incorrect formatting in array's documentation.Nathaniel Ringo-1/+1
2017-03-31Rollup merge of #40703 - GuillaumeGomez:pointer-docs, r=steveklabnikCorey Farwell-4/+9
Add missing urls in ptr docs r? @rust-lang/docs
2017-03-21Add missing urls in ptr docsGuillaume Gomez-4/+9
2017-03-20Fix up various linkssteveklabnik-2/+2
The unstable book, libstd, libcore, and liballoc all needed some adjustment.
2017-03-13Remove function invokation parens from documentation links.Corey Farwell-3/+3
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-02-20Revert "Fix up links"Steve Klabnik-1/+1
This reverts commit 7f1d1c6d9a7be5e427bace30e740b16b25f25c92. 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!