about summary refs log tree commit diff
path: root/src/libstd/primitive_docs.rs
AgeCommit message (Collapse)AuthorLines
2020-04-05Do not use "nil" to refer to `()`Ross MacArthur-1/+1
2020-02-12Add notice about using new consts in new code on float modulesLinus Färnstrand-2/+2
2020-02-12Remove reference from integer docs to their modulesLinus Färnstrand-24/+0
2019-12-22Format the worldMark Rousskov-27/+27
2019-12-14Revert "Stabilize the `never_type`, written `!`."Niko Matsakis-1/+3
This reverts commit 15c30ddd69d6cc3fffe6d304c6dc968a5ed046f1.
2019-11-21Stabilize the `never_type`, written `!`.Mazdak Farrokhzad-3/+1
2019-10-01Remove unneeded `fn main` blocks from docsLzu Tao-7/+5
2019-09-28Slice docs: fix typoAndre Bogus-1/+1
2019-09-27Docs: slice elements are equidistantAndre Bogus-1/+3
2019-08-22Update occurences of as_sliceSebastian Martinez-1/+1
Update occurences of as_slice to as_str
2019-07-23word things more like we usually doRalf Jung-2/+2
2019-07-23Apply suggestions from code reviewRalf Jung-3/+6
Co-Authored-By: gnzlbg <gnzlbg@users.noreply.github.com>
2019-07-22account for non-drop-glue typesRalf Jung-2/+3
2019-07-22weasle, weasleRalf Jung-3/+3
2019-07-21apply feedbackRalf Jung-4/+6
2019-07-21sync with nomicon: raw ptr must be non-dangling and aligned every time it is ↵Ralf Jung-2/+2
dereferenced
2019-07-20references must be aligned; also move up the warning that fn ptrs must be ↵Ralf Jung-7/+8
non-NULL
2019-07-20warn that raw pointers must be aligned when used, and that writes cause dropRalf Jung-2/+6
2019-06-22TypoFelix Rabe-1/+1
2019-06-11Rollup merge of #61652 - JohnTitor:docs-improve-array, r=CentrilMazdak Farrokhzad-2/+12
Mention slice patterns in array Fixes #61650 r? @scottmcm
2019-06-10Add an exampleYuki Okushi-0/+10
2019-06-08Mention slice patternsYuki Okushi-2/+2
2019-05-26Document tuple's Ord behavior as sequentialChris Gregory-0/+4
2019-05-04Correct code points to match their textual descriptionGianluca Recchia-1/+1
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