summary refs log tree commit diff
path: root/library/std
AgeCommit message (Collapse)AuthorLines
2020-08-25Auto merge of #75364 - rylev:libpanic-abort-failfast, r=alexcrichtonbors-8/+4
Call into fastfail on abort in libpanic_abort on Windows x86(_64) This partially resolves #73215 though this is only for x86 targets. This code is directly lifted from [libstd](https://github.com/rust-lang/rust/blob/13290e83a6e20f3b408d177a9d64d8cf98fe4615/library/std/src/sys/windows/mod.rs#L315). `__fastfail` is the preferred way to abort a process on Windows as it will hook into debugger toolchains. Other platforms expose a `_rust_abort` symbol which wraps `std::sys::abort_internal`. This would also work on Windows, but is a slightly largely change as we'd need to make sure that the symbol is properly exposed to the linker. I'm inlining the call to the `__fastfail`, but the indirection through `rust_abort` might be a cleaner approach. A different instruction must be used on ARM architectures. I'd like to verify this works first before tackling ARM.
2020-08-24Auto merge of #75110 - lzutao:ip-endianness, r=Mark-Simulacrumbors-11/+18
Minor changes to Ipv4Addr Minor changes to Ipv4Addr * Impl IntoInner rather than AsInner for Ipv4Addr * Add some comments * Add test to show endiannes of Ipv4Addr display
2020-08-24Auto merge of #75815 - jyn514:ambiguous-primitives, r=guillaumegomezbors-4/+10
Report an ambiguity if both modules and primitives are in scope for intra-doc links Closes https://github.com/rust-lang/rust/issues/75381 - Add a new `prim@` disambiguator, since both modules and primitives are in the same namespace - Refactor `report_ambiguity` into a closure Additionally, I noticed that rustdoc would previously allow `[struct@char]` if `char` resolved to a primitive (not if it had a DefId). I fixed that and added a test case. I also need to update libstd to use `prim@char` instead of `type@char`. If possible I would also like to refactor `ambiguity_error` to use `Disambiguator` instead of its own hand-rolled match - that ran into issues with `prim@` (I updated one and not the other) and it would be better for them to be in sync.
2020-08-24Rollup merge of #75859 - jrheard:patch-2, r=jonas-schievinkYuki Okushi-1/+1
doc: Fix typo in std::process::Child documentation Nearly done reading stdlib docs, found another small typo, here's a PR! r? @steveklabnik
2020-08-24Rollup merge of #75847 - camelid:patch-1, r=dtolnayYuki Okushi-9/+1
Switch to intra-doc links in `std::collections` Part of #75080. @rustbot modify labels: A-intra-doc-links T-doc T-rustdoc
2020-08-24Rollup merge of #75831 - lzutao:https, r=Dylan-DPCYuki Okushi-1/+1
doc: Prefer https link for wikipedia URLs A tiny changes.
2020-08-24Rollup merge of #75821 - camelid:intra-doc-links-for-std-macros, r=jyn514Yuki Okushi-14/+13
Switch to intra-doc links in `std::macros` Part of #75080. --- * Switch to intra-doc links in `std::macros` * Fix typo in module docs * Link to `std::io::stderr` instead of `std::io::Stderr` to match the link text * Link to `std::io::stdout` --- @rustbot modify labels: A-intra-doc-links T-doc T-rustdoc
2020-08-23Convert str -> prim@str in `std`Joshua Nelson-4/+10
2020-08-23doc: Fix typo in std::process::Child documentationJR Heard-1/+1
2020-08-23Switch to intra-doc links in `std::collections`Camelid-9/+1
2020-08-23Auto merge of #75028 - MrModder:master, r=steveklabnikbors-0/+14
Document that slice refers to any pointer type to a sequence I was recently confused about the way slices are represented in memory. The necessary information was not available in the std-docs directly, but was a mix of different material from the reference and book. This PR should clear up the definition of slices a bit more in the documentation. Especially the fact that the term slice refers to the pointer/reference type, e.g. `&[T]`, and not `[T]`. It also documents that slice pointers are twice the size of pointers to `Sized` types, as this concept may be unfamiliar to users coming from other languages that do not have the concept of "fat pointers" (especially C/C++). I've documented why this was important to me and my findings in [this blog post](https://codecrash.me/understanding-rust-slices). r? @lcnr
2020-08-23remove an unused feature flagRalf Jung-1/+1
2020-08-23Revert changed paragraph about slice definition.Leon Matthes-2/+2
This reverts part of commit e6c83dd57b920d2069797736ae0a1c9fe14a97cb. As requested by @steveklabnik .
2020-08-23Prefer https link for wikipedia URLsLzu Tao-1/+1
2020-08-22Add missing linksCamelid-3/+3
2020-08-22Add missing intra-doc linkCamelid-0/+2
2020-08-22Switch to intra-doc links in `std::macros`Camelid-11/+8
Also: * Fix typo in module docs * Link to `std::io::stderr` instead of `std::io::Stderr` to match the link text * Link to `std::io::stdout`
2020-08-22Auto merge of #75790 - LeSeulArtichaut:std-intra-doc, r=jyn514bors-136/+53
Use intra-doc-links in `std::sync::*` Helps with #75080. r? @jyn514
2020-08-22Use intra-doc-links in `std::sync::*`LeSeulArtichaut-136/+53
2020-08-21Remove wrapper type handling absent raw standard streamsTomasz Miąsko-100/+33
Raw standard streams are always available. Remove unused wrapper type that was supposed to be responsible for handling their absence.
2020-08-21Make raw standard stream constructors constTomasz Miąsko-30/+33
2020-08-21Remove result type from raw standard streams constructorsTomasz Miąsko-79/+71
Raw standard streams constructors are infallible. Remove unnecessary result type.
2020-08-21Rollup merge of #75750 - poliorcetics:intra-links-std-thread, r=jyn514Yuki Okushi-87/+40
Move to intra doc links for std::thread documentation Helps with #75080. @rustbot modify labels: T-doc, A-intra-doc-links, T-rustdoc r? @jyn514
2020-08-21Rollup merge of #75324 - ericseppanen:master, r=JohnTitorYuki Okushi-1/+3
clarify documentation of remove_dir errors remove_dir will error if the path doesn't exist or isn't a directory. It's useful to clarify that this is "remove dir or fail" not "remove dir if it exists". I don't think this belongs in the title. "Removes an existing, empty directory" is strangely worded-- there's no such thing as a non-existing directory. Better to just say explicitly it will return an error.
2020-08-20Move to intra doc links for std::thread documentationAlexis Bourget-87/+40
2020-08-20Rollup merge of #75703 - tmiasko:stack-overflow-musl, r=cuviperJosh Stone-6/+21
Enable stack-overflow detection on musl for non-main threads
2020-08-19Rollup merge of #75696 - matklad:mirit, r=RalfJungTyler Mandry-24/+4
Remove `#[cfg(miri)]` from OnceCell tests They were carried over from once_cell crate, but they are not entirely correct (as miri now supports more things), and we don't run miri tests for std, so let's just remove them. Maybe one day we'll run miri in std, but then we can just re-install these attributes.
2020-08-19Rollup merge of #75674 - poliorcetics:intra-links-std-io, r=jyn514Tyler Mandry-155/+135
Move to intra doc links for std::io Helps with #75080. @rustbot modify labels: T-doc, A-intra-doc-links, T-rustdoc r? @jyn514 I had no problems with those files so I added some small links here and there.
2020-08-19Rollup merge of #75648 - matklad:lazy-dropck, r=KodrAusTyler Mandry-2/+12
Make OnceCell<T> transparent to dropck See the failed build in https://github.com/rust-lang/rust/pull/75555#issuecomment-675016718 for an example where we need this in real life r? @ghost
2020-08-19Fix nits in intra-doc links for std ioAlexis Bourget-22/+22
2020-08-19Remove `#[cfg(miri)]` from OnceCell testsAleksey Kladov-24/+4
They were carried over from once_cell crate, but they are not entirely correct (as miri now supports more things), and we don't run miri tests for std, so let's just remove them. Maybe one day we'll run miri in std, but then we can just re-install these attributes.
2020-08-19Rollup merge of #75685 - nixphix:docs/unix-ext, r=jyn514Yuki Okushi-76/+26
Switch to intra-doc links in /src/sys/unix/ext/*.rs Partial fix for #75080 @rustbot modify labels: T-doc, A-intra-doc-links, T-rustdoc r? @jyn514 These two links are not resolving to either `crate::fs::File...` or `fs::File...` ``` # unix/ext/fs.rs 27: /// [`File::read`]: ../../../../std/fs/struct.File.html#method.read 130: /// [`File::write`]: ../../../../std/fs/struct.File.html#method.write ```
2020-08-19Rollup merge of #75646 - poliorcetics:intra-links-keywords, r=jyn514Yuki Okushi-16/+4
Move to intra doc links for keyword documentation Helps with #75080. @rustbot modify labels: T-doc, A-intra-doc-links, T-rustdoc
2020-08-19Minor changes to Ipv4AddrLzu Tao-11/+18
* Impl IntoInner rather than AsInner for Ipv4Addr * Add some comments * Add test to show endiannes of Ipv4Addr display
2020-08-19resolve commentsPrabakaran Kumaresshan-11/+0
2020-08-19Switch to intra-doc links in /src/sys/unix/ext/*.rsPrabakaran Kumaresshan-74/+35
2020-08-19Enable stack-overflow detection on musl for non-main threadsTomasz Miąsko-6/+21
2020-08-18Move to intra doc links for std::ioAlexis Bourget-146/+126
2020-08-18Make `grow_impl` unsafeTim Diekmann-3/+6
2020-08-18Add comment, which was removed by accident (again)Tim Diekmann-0/+2
2020-08-18Clean up AllocRef implementation and documentationTim Diekmann-77/+77
2020-08-18Auto merge of #75621 - TimDiekmann:no-fast-realloc, r=Amanieubors-17/+10
Remove fast path in reallocation for same layout sizes r? @Amanieu Before merging a perf-run should be done. Closes https://github.com/rust-lang/wg-allocators/issues/70
2020-08-18Rollup merge of #75629 - EllenNyan:ellen-intra-doc-links, r=jyn514Yuki Okushi-65/+13
Use intra-doc links in `std::env`, `std::alloc` and `std::error` This is partial fixes for #75080.
2020-08-18Rollup merge of #75464 - poliorcetics:intra-links-panic-and-ascii, r=jyn514Yuki Okushi-30/+10
Move to intra doc links for ascii.rs and panic.rs Helps with #75080. @rustbot modify labels: T-doc, A-intra-doc-links, T-rustdoc I also updated the doc to fix the wording in `AsciiExt` since it is now deprecated. The two file are small changes so I bundled them together. Some links could not be changed to make them work, I believe those are known issues with primitive types.
2020-08-18Make OnceCell<T> transparent to dropckAleksey Kladov-2/+12
See the failed build in https://github.com/rust-lang/rust/pull/75555#issuecomment-675016718 for an example where we need this in real life
2020-08-17Move to intra doc links for keyword documentationAlexis Bourget-16/+4
2020-08-17Remove unnecessary links in env.rsEllen-8/+0
2020-08-17Switch to intra-doc links for std/src/alloc.rsEllen-9/+0
2020-08-17Switch to intra-doc links for std/src/env.rsEllen-27/+14
2020-08-17Switch to intra-doc links for std/src/error.rsEllen-25/+3