Matthias Krüger
9c4b81c238
Rollup merge of #130922 - tyilo:udp-unspecified, r=ibraheemdev
...
Reference UNSPECIFIED instead of INADDR_ANY in join_multicast_v4
2024-09-28 09:35:09 +02:00
Matthias Krüger
6e9db86787
Rollup merge of #125404 - a1phyr:fix-read_buf-uses, r=workingjubilee
...
Fix `read_buf` uses in `std`
Following lib-team decision here: https://github.com/rust-lang/rust/issues/78485#issuecomment-2122992314
Guard against the pathological behavior of both returning an error and performing a read.
2024-09-28 09:35:08 +02:00
Trevor Gross
404c5d26c9
Enable f16 on platforms that were missing conversion symbols
...
The only requirement for `f16` support, aside from LLVM not crashing and
no ABI issues, is that symbols to convert to and from `f32` are
available. Since the update to compiler-builtins in [1], we now provide
these on all platforms.
This also enables `f16` math since there are no further requirements.
Still excluded are platforms for which LLVM emits infinitely-recursing
code.
[1]: https://github.com/rust-lang/rust/pull/125016
2024-09-27 18:15:02 -04:00
Michael Goulet
7033468a67
Mark some more types as having insignificant dtor
2024-09-27 11:59:39 -04:00
Asger Hautop Drewsen
fa3215daad
Reference UNSPECIFIED instead of INADDR_ANY in join_multicast_v4
2024-09-27 10:05:52 +02:00
Jubilee
1e882537d4
Rollup merge of #130875 - folkertdev:naked-asm-bootstrap, r=tgross35
...
update `compiler-builtins` to 0.1.126
this requires the addition of a bootstrap variant of the new `naked_asm!` macro
r? `@tgross35`
extracted from https://github.com/rust-lang/rust/pull/128651
2024-09-26 22:20:55 -07:00
Jubilee
9734723259
Rollup merge of #130846 - ChrisDenton:revert-break, r=Noratrieb
...
Revert Break into the debugger on panic (129019)
This was talked about a bit at a recent libs meeting. While I think experimenting with this is worthwhile, I am nervous about this new behaviour reaching stable. We've already reverted on one tier 1 platform (Linux, https://github.com/rust-lang/rust/pull/130810 ) which means we have differing semantics on different tier 1 platforms. Also the fact it triggers even when `catch_unwind` is used to catch the panic means it can be very noisy in some projects.
At the very least I think it could use some more discussion before being instantly stable. I think this could maybe be re-landed with an environment variable to control/override the behaviour. But that part would likely need a libs-api decision.
cc ````@workingjubilee```` ````@kromych````
2024-09-26 22:20:54 -07:00
Guillaume Gomez
329f9fcb05
Rollup merge of #130861 - cuviper:sun-path-offset, r=ibraheemdev
...
Use `mem::offset_of!` for `sockaddr_un.sun_path`
We don't need manual pointer math here anymore!
try-job: dist-i686-msvc
2024-09-27 00:43:33 +02:00
Josh Stone
9431d1ab4e
Add sun_path to the fake doc sockaddr_un
2024-09-26 09:33:30 -07:00
Folkert de Vries
42542d8cda
update compiler_builtins to 0.1.126
2024-09-26 09:54:28 +02:00
Josh Stone
f4d9d1a0ea
Use &raw in the standard library
...
Since the stabilization in #127679 has reached stage0, 1.82-beta, we can
start using `&raw` freely, and even the soft-deprecated `ptr::addr_of!`
and `ptr::addr_of_mut!` can stop allowing the unstable feature.
I intentionally did not change any documentation or tests, but the rest
of those macro uses are all now using `&raw const` or `&raw mut` in the
standard library.
2024-09-25 17:03:20 -07:00
Josh Stone
a51b0a2adf
Use mem::offset_of! for sockaddr_un.sun_path
2024-09-25 16:40:50 -07:00
Matthias Krüger
e805182fcc
Rollup merge of #130842 - Noratrieb:tracking-issue-inprogress, r=jieyouxu
...
Add tracking issue for io_error_inprogress
I forgot to mention this in #130789
2024-09-25 20:11:01 +02:00
Matthias Krüger
3ee3e063c1
Rollup merge of #130811 - RalfJung:random, r=joboet
...
add link from random() helper fn to extensive DefaultRandomSource docs
2024-09-25 20:10:59 +02:00
Chris Denton
d3e59a502b
Revert Break into the debugger on panic (129019)
2024-09-25 17:53:57 +00:00
nora
ded22ea181
Add tracking issue for io_error_inprogress
2024-09-25 17:40:55 +02:00
bors
2933f68abe
Auto merge of #130816 - matthiaskrgr:rollup-jy25phv, r=matthiaskrgr
...
Rollup of 6 pull requests
Successful merges:
- #130549 (Add RISC-V vxworks targets)
- #130595 (Initial std library support for NuttX)
- #130734 (Fix: ices on virtual-function-elimination about principal trait)
- #130787 (Ban combination of GCE and new solver)
- #130809 (Update llvm triple for OpenHarmony targets)
- #130810 (Don't trap into the debugger on panics under Linux)
r? `@ghost`
`@rustbot` modify labels: rollup
2024-09-25 08:43:14 +00:00
Matthias Krüger
9d134cc26a
Rollup merge of #130810 - kromych:master, r=workingjubilee
...
Don't trap into the debugger on panics under Linux
This breaks `rr`, see https://github.com/rust-lang/rust/pull/129019#issuecomment-2369361278 for the discussion
CC `@khuey` `@workingjubilee`
2024-09-25 10:09:24 +02:00
Matthias Krüger
5b727870fa
Rollup merge of #130595 - no1wudi:master, r=ibraheemdev
...
Initial std library support for NuttX
This PR add the initial libstd support for NuttX platform (Tier 3), currently it depends on https://github.com/rust-lang/libc/pull/3909 which provide the essential libc definitions.
2024-09-25 10:09:22 +02:00
Matthias Krüger
508b433e27
Rollup merge of #130549 - biabbas:riscv32_wrs_vxworks, r=nnethercote
...
Add RISC-V vxworks targets
Risc-V 32 and RISC-V 64 targets are to be added in the target list.
2024-09-25 10:09:22 +02:00
Ralf Jung
1fe049ad57
add link from random() helper fn to extensive DefaultRandomSource docs
2024-09-25 08:25:36 +02:00
bors
4c62024cd5
Auto merge of #130803 - cuviper:file-buffered, r=joshtriplett
...
Add `File` constructors that return files wrapped with a buffer
In addition to the light convenience, these are intended to raise visibility that buffering is something you should consider when opening a file, since unbuffered I/O is a common performance footgun to Rust newcomers.
ACP: https://github.com/rust-lang/libs-team/issues/446
Tracking Issue: #130804
2024-09-25 04:57:12 +00:00
kromych
49d1c3b433
Don't trap into the debugger on panics under Linux
...
This breaks `rr`, see https://github.com/rust-lang/rust/pull/129019#issuecomment-2369361278
for the discussion
CC @khuey @workingjubilee
2024-09-24 19:52:14 -07:00
Trevor Gross
147aa8611a
Rollup merge of #130789 - aviramha:add_inprogress, r=Noratrieb
...
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-24 19:47:51 -04:00
Josh Stone
458537ebc0
Add a tracking issue for file_buffered
2024-09-24 15:06:55 -07:00
Josh Stone
0999b019f8
Dogfood feature(file_buffered)
2024-09-24 14:25:16 -07:00
Gabriel Bjørnager Jensen
26c4893ae6
Mark 'get_mut' and 'set_position' in 'std::io::Cursor' as const;
2024-09-24 23:01:58 +02:00
Josh Stone
1e9a50dde8
Pre-allocate buffers in File::open_buffered and create_buffered
2024-09-24 13:33:31 -07:00
Josh Stone
ee129b12ed
Add File::open_buffered and create_buffered
2024-09-24 13:32:29 -07:00
Aviram Hassan
46fd76e9a5
add InProgress ErrorKind gated behind io_error_inprogress feature
...
Co-authored-by: David Tolnay <dtolnay@gmail.com >
Co-authored-by: nora <48135649+Noratrieb@users.noreply.github.com >
2024-09-24 20:49:56 +03:00
Trevor Gross
e95d15a115
Pin memchr to 2.5.0 in the library rather than rustc_ast
...
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-24 18:09:43 +02:00
Huang Qi
24f622cf80
Initial std library support for NuttX
...
Signed-off-by: Huang Qi <huangqi3@xiaomi.com >
2024-09-24 15:35:40 +08:00
Michael Goulet
0a0ea28f26
Rollup merge of #129545 - notriddle:notriddle/toolbar-v2, r=GuillaumeGomez
...
rustdoc: redesign toolbar and disclosure widgets
Fixes #77899
Fixes #90310
## Preview
| before | after
| ------ | -----
|  | 
|  | 
|  | 
|  | 
|  | 
| N/A | 
|  | 
|  | 
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 ⬅️ I can understand why, but words are great when icons fail.

2024-09-23 23:49:11 -04:00
Benoît du Garreau
d77664bed9
Add a comment to Read::read_buf
2024-09-23 22:51:27 +02:00
Benoît du Garreau
4b8a66c908
Add tests
2024-09-23 22:51:27 +02:00
Benoît du Garreau
bf768886d1
Fix io::default_read_to_end uses of read_buf
2024-09-23 22:51:27 +02:00
Benoît du Garreau
04710e27d2
Fix io::BufReader uses of read_buf
2024-09-23 22:51:27 +02:00
Benoît du Garreau
ba3b536e20
Fix io::Take::read_buf
2024-09-23 22:51:27 +02:00
Michael Howell
e31a719cce
Fix up standard library intro
2024-09-23 09:21:39 -07:00
Yoh Deadfall
e424a8c01f
Clarifications for set_nonblocking methods
2024-09-23 12:54:07 +03:00
joboet
e94dd9b712
random: add tracking issue, address other comments
2024-09-23 10:36:16 +02:00
joboet
b9d47cfa9b
std: switch to faster random sources on macOS and most BSDs
2024-09-23 10:36:16 +02:00
joboet
5c1c725724
std: implement the random feature
...
Implements the ACP https://github.com/rust-lang/libs-team/issues/393 .
2024-09-23 10:29:51 +02:00
Matthias Krüger
004213b77d
Rollup merge of #130723 - D0liphin:master, r=workingjubilee
...
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-23 06:45:37 +02:00
Michael Goulet
c682aa162b
Reformat using the new identifier sorting from rustfmt
2024-09-22 19:11:29 -04:00
Oli Iliffe
e9b0bc9432
Add test for available_parallelism()
...
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-22 23:46:08 +01:00
The 8472
ca1a2a6457
wait for two short reads before uncapping the max read size
...
for disk IO:
1st short read = probably at end of file
2nd short read = confirming that it's indeed EOF
2024-09-21 18:50:29 +02:00
Matthias Krüger
f2290c23fc
Rollup merge of #129718 - lolbinarycat:remove_dir-docs, r=Noratrieb
...
add guarantee about remove_dir and remove_file error kinds
approved in ACP https://github.com/rust-lang/libs-team/issues/433
2024-09-21 07:22:47 +02:00
bors
da889684c8
Auto merge of #130631 - GuillaumeGomez:rollup-jpgy1iv, r=GuillaumeGomez
...
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-20 19:51:45 +00:00
nora
c72264157b
Remove double spaces
2024-09-20 19:55:28 +02:00