about summary refs log tree commit diff
path: root/library/std
AgeCommit message (Collapse)AuthorLines
2024-09-24Don't trap into the debugger on panics under Linuxkromych-78/+1
This breaks `rr`, see https://github.com/rust-lang/rust/pull/129019#issuecomment-2369361278 for the discussion CC @khuey @workingjubilee
2024-09-24Rollup merge of #130789 - aviramha:add_inprogress, r=NoratriebTrevor Gross-0/+8
add InProgress ErrorKind gated behind io_error_inprogress feature Follow up on https://github.com/rust-lang/libs-team/issues/92#issuecomment-2371666560
2024-09-24Add a tracking issue for `file_buffered`Josh Stone-2/+2
2024-09-24Dogfood `feature(file_buffered)`Josh Stone-2/+2
2024-09-24Mark 'get_mut' and 'set_position' in 'std::io::Cursor' as const;Gabriel Bjørnager Jensen-2/+4
2024-09-24Pre-allocate buffers in `File::open_buffered` and `create_buffered`Josh Stone-3/+38
2024-09-24Add `File::open_buffered` and `create_buffered`Josh Stone-0/+71
2024-09-24add InProgress ErrorKind gated behind io_error_inprogress featureAviram Hassan-0/+8
Co-authored-by: David Tolnay <dtolnay@gmail.com> Co-authored-by: nora <48135649+Noratrieb@users.noreply.github.com>
2024-09-24Pin memchr to 2.5.0 in the library rather than rustc_astTrevor Gross-0/+4
The latest versions of `memchr` experience LTO-related issues when compiling for windows-gnu [1], so needs to be pinned. The issue is present in the standard library. `memchr` has been pinned in `rustc_ast`, but since the workspace was recently split, this pin no longer has any effect on library crates. Resolve this by adding `memchr` as an _unused_ dependency in `std`, pinned to 2.5. Additionally, remove the pin in `rustc_ast` to allow non-library crates to upgrade to the latest version. Link: https://github.com/rust-lang/rust/issues/127890 [1]
2024-09-24Initial std library support for NuttXHuang Qi-21/+223
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2024-09-23Rollup merge of #129545 - notriddle:notriddle/toolbar-v2, r=GuillaumeGomezMichael Goulet-7/+11
rustdoc: redesign toolbar and disclosure widgets Fixes #77899 Fixes #90310 ## Preview | before | after | ------ | ----- | ![image](https://github.com/user-attachments/assets/ebeec185-3a72-481d-921e-a9a885f348d9) | ![image](https://github.com/user-attachments/assets/08735a65-99d1-4523-ab77-ddb164c0a5db) | ![image](https://github.com/user-attachments/assets/ae8e0f24-49cb-445d-b9bd-cec9c57b94e7) | ![image](https://github.com/user-attachments/assets/ba484f94-b031-41fc-b8a8-6cd81be8fb6b) | ![image](https://github.com/user-attachments/assets/8c2cc041-a138-4950-a12e-3d529c8a5339) | ![image](https://github.com/user-attachments/assets/e7f010bd-19e2-4711-85bf-3fd00c3e5647) | ![image](https://github.com/user-attachments/assets/e2b63785-971c-489e-b069-eb85f6a30620) | ![image](https://github.com/user-attachments/assets/b65eea16-d6a3-4aa3-8a27-6ded74009010) | ![image](https://github.com/user-attachments/assets/1c7b0901-a61a-4325-9d01-9d8b14b476aa) | ![image](https://github.com/user-attachments/assets/d4a485db-d9f1-4a62-94bc-a3d125ea6dc1) | N/A | ![image](https://github.com/user-attachments/assets/7add0a2a-7fd7-483d-87ee-51ee45a2fe5d) | ![image](https://github.com/user-attachments/assets/334f50bc-9f8d-42d9-a7df-95058f7cdfd5) | ![image](https://github.com/user-attachments/assets/451fcc22-b034-453c-ae4b-b948fd6bd779) | ![image](https://github.com/user-attachments/assets/132f720c-802a-466d-bd55-c7a4750acdc3) | ![image](https://github.com/user-attachments/assets/177b7921-06c5-467d-87d3-9cdf88c4e50b) https://notriddle.com/rustdoc-html-demo-12/toolbar-v2/std/index.html ## Description This adds labels to the icons and moves them away from the search box. These changes are made together, because they work together, but are based on several complaints: * The [+/-] thing are a Reddit-ism. They don't look like buttons, but look like syntax <https://rust-lang.zulipchat.com/#narrow/stream/266220-t-rustdoc/topic/More.20visual.20difference.20for.20the.20.2B.2F-.20.20Icons>, <https://github.com/rust-lang/rust/issues/59851> (some of these are laundry lists with more suggestions, but they all mention [+/-] looking wrong) * The settings, help, and summary buttons are also too hard to recognize <https://lwn.net/Articles/987070/>, <https://github.com/rust-lang/rust/issues/90310>, <https://github.com/rust-lang/rust/issues/14475#issuecomment-274241997>, <https://internals.rust-lang.org/t/improve-rustdoc-design/12758> ("Not all functionality is self-explanatory, for example the [+] button in the top right corner, the theme picker or the settings button.") The toggle-all and toggle-individual buttons both need done at once, since we want them to look like they go together. This changes them from both being [+/-] to both being arrows. CC <https://github.com/rust-lang/rust/pull/113074#issuecomment-1677469680> and ``@jsha`` regarding the use of triangles for disclosure, which is what everyone wanted, but was pending a good toggle-all button. This PR adds a toggle-all button that should work. Settings and Help are also migrated, so that the whole group can benefit from being described using actual words. The breadcrumbs also get redesigned, so that they use less space, by shrinking the parent module path parts. This is done at the same time as the toolbar redesign because it's, effectively, moving space from the toolbar to the breadcrumbs. This is aimed at avoiding any line wrapping at desktop sizes. ## Prior art This style of toolbar, with explicit labels on the buttons, used to be more popular. It's not very common in web browsers nowadays, and for truly universal icons like :arrow_left: I can understand why, but words are great when icons fail. ![image](https://github.com/user-attachments/assets/9a4a0498-232d-4d60-87b9-f601f4515254)
2024-09-23Add a comment to `Read::read_buf`Benoît du Garreau-0/+2
2024-09-23Add testsBenoît du Garreau-0/+63
2024-09-23Fix `io::default_read_to_end` uses of `read_buf`Benoît du Garreau-10/+14
2024-09-23Fix `io::BufReader` uses of `read_buf`Benoît du Garreau-2/+4
2024-09-23Fix `io::Take::read_buf`Benoît du Garreau-4/+5
2024-09-23Fix up standard library introMichael Howell-7/+11
2024-09-23Clarifications for set_nonblocking methodsYoh Deadfall-2/+2
2024-09-23random: add tracking issue, address other commentsjoboet-11/+16
2024-09-23std: switch to faster random sources on macOS and most BSDsjoboet-102/+90
2024-09-23std: implement the `random` featurejoboet-464/+722
Implements the ACP https://github.com/rust-lang/libs-team/issues/393.
2024-09-23Rollup merge of #130723 - D0liphin:master, r=workingjubileeMatthias Krüger-0/+18
Add test for `available_parallelism()` This is a redo of [this PR](https://github.com/rust-lang/rust/pull/104095). I changed the location of the test as per comments in the original thread. Otherwise the test is practically the same. try-job: test-various
2024-09-22Reformat using the new identifier sorting from rustfmtMichael Goulet-314/+303
2024-09-22Add test for `available_parallelism()`Oli Iliffe-0/+18
This is a redo of (this PR)[https://github.com/rust-lang/rust/pull/104095]. Add test for available_parallelism Add test for available_parallelism Add test for Add test for
2024-09-21wait for two short reads before uncapping the max read sizeThe 8472-3/+13
for disk IO: 1st short read = probably at end of file 2nd short read = confirming that it's indeed EOF
2024-09-21Rollup merge of #129718 - lolbinarycat:remove_dir-docs, r=NoratriebMatthias Krüger-0/+10
add guarantee about remove_dir and remove_file error kinds approved in ACP https://github.com/rust-lang/libs-team/issues/433
2024-09-20Auto merge of #130631 - GuillaumeGomez:rollup-jpgy1iv, r=GuillaumeGomezbors-7/+6
Rollup of 7 pull requests Successful merges: - #128209 (Remove macOS 10.10 dynamic linker bug workaround) - #130526 (Begin experimental support for pin reborrowing) - #130611 (Address diagnostics regression for `const_char_encode_utf8`.) - #130614 (Add arm64e-apple-tvos target) - #130617 (bail if there are too many non-region infer vars in the query response) - #130619 (Fix scraped examples height) - #130624 (Add `Vec::as_non_null`) r? `@ghost` `@rustbot` modify labels: rollup
2024-09-20Remove double spacesnora-2/+2
2024-09-20Rollup merge of #128209 - beetrees:no-macos-10.10, r=jieyouxuGuillaume Gomez-7/+6
Remove macOS 10.10 dynamic linker bug workaround Rust's current minimum macOS version is 10.12, so the hack can be removed. This PR also updates the `remove_dir_all` docs to reflect that all supported macOS versions are protected against TOCTOU race conditions (the fallback implementation was already removed in #127683). try-job: dist-x86_64-apple try-job: dist-aarch64-apple try-job: dist-apple-various try-job: aarch64-apple try-job: x86_64-apple-1
2024-09-20Auto merge of #124895 - obeis:static-mut-hidden-ref, r=compiler-errorsbors-0/+9
Disallow hidden references to mutable static Closes #123060 Tracking: - https://github.com/rust-lang/rust/issues/123758
2024-09-20Allow unused unsafe for vxworks in alligned_malloc to resolve build errorsB I Mohammed Abbas-0/+1
2024-09-20[Clippy] Remove final std paths for diagnostic itemGnomedDev-0/+1
2024-09-19Rollup merge of #130554 - ShE3py:unsupported-exitcode, r=NoratriebMatthias Krüger-7/+4
`pal::unsupported::process::ExitCode`: use an `u8` instead of a `bool` `ExitCode` should “represents the status code the current process can return to its parent under normal termination”, but is currently represented as a `bool` on unsupported platforms, making the `impl From<u8> for ExitCode` lossy. Fixes #130532. History: [IRLO thread](https://internals.rust-lang.org/t/mini-pre-rfc-redesigning-process-exitstatus/5426) (`ExitCode` as a `main` return), #48618 (initial impl), #93445 (`From<u8>` impl).
2024-09-19`pal::unsupported::process::ExitCode`: use an `u8` instead of a `bool`Lieselotte-7/+4
2024-09-19[Clippy] Swap `open_options` to use diagnostic items instead of pathsGnomedDev-0/+2
2024-09-19[Clippy] Swap `iter_over_hash_type` to use diagnostic items instead of pathsGnomedDev-0/+8
2024-09-19[Clippy] Swap `non_octal_unix_permissions` to use diagnostic item instead of ↵GnomedDev-0/+1
path
2024-09-19[Clippy] Swap `instant_subtraction` to use diagnostic item instead of pathGnomedDev-0/+1
2024-09-19[Clippy] Swap `manual_main_separator_str` to use diagnostic item instead of pathGnomedDev-0/+1
2024-09-19[Clippy] Swap `redundant_clone` to use diagnostic items instead of pathsGnomedDev-0/+2
2024-09-19[Clippy] Swap `option_as_ref_deref` to use diagnostic items instead of pathsGnomedDev-0/+2
2024-09-19[Clippy] Swap `map_entry` to use diagnostic items instead of pathsGnomedDev-0/+2
2024-09-18Rollup merge of #130522 - GnomedDev:clippy-manual-retain-paths, ↵Jubilee-0/+1
r=compiler-errors [Clippy] Swap `manual_retain` to use diagnostic items instead of paths Part of https://github.com/rust-lang/rust-clippy/issues/5393, just a chore.
2024-09-18Rollup merge of #130513 - shekhirin:fs-write-doc-comment, r=cuviperJubilee-1/+1
Clarify docs for std::fs::File::write This PR fixes the doc comment for `std::fs::File::write` method.
2024-09-18Rollup merge of #130476 - workingjubilee:more-lazy-methods-take-2, r=AmanieuJubilee-6/+170
Implement ACP 429: add `Lazy{Cell,Lock}::get[_mut]` and `force_mut` Tracking issue for `lazy_get`: https://github.com/rust-lang/rust/issues/129333
2024-09-18Rollup merge of #129934 - ChrisDenton:remove-dir-all3, r=AmanieuJubilee-3/+12
Win: Open dir for sync access in remove_dir_all A small follow up to #129800. We should explicitly open directories for synchronous access. We ultimately use `GetFileInformationByHandleEx` to read directories which should paper over any issues caused by using async directory reads (or else return an error) but it's better to do the right thing in the first place. Note though that `delete` does not read or write any data so it's not necessary there.
2024-09-18Rollup merge of #97524 - ibraheemdev:thread-raw, r=ibraheemdevJubilee-0/+48
Add `Thread::{into_raw, from_raw}` Public API: ```rust #![unstable(feature = "thread_raw", issue = "97523")] impl Thread { pub fn into_raw(self) -> *const (); pub unsafe fn from_raw(ptr: *const ()) -> Thread; } ``` ACP: https://github.com/rust-lang/libs-team/issues/200
2024-09-18library: Call it really_init_mut to avoid name collisionsJubilee Young-2/+2
2024-09-18library: Destabilize Lazy{Cell,Lock}::{force,deref}_mutJubilee Young-14/+4
2024-09-18[Clippy] Swap `manual_retain` to use diagnostic items instead of pathsGnomedDev-0/+1