Commit graph

27173 commits

Author SHA1 Message Date
许杰友 Jieyou Xu (Joe)
de68f27bc1
Rollup merge of #152174 - folkertdev:stdarch-sync-2026-02-05, r=folkertdev
stdarch subtree update

Subtree update of `stdarch` to 1a7cc47efc.

Created using https://github.com/rust-lang/josh-sync.

r? @ghost
2026-02-06 10:25:42 +08:00
Eddy (Eduard) Stefes
edeb02f382 disable s390x vector intrinsics if softfloat is enabled
we will add an explicit incompatibility of softfloat and vector feature
in rutsc s390x-unknown-none-softfloat target specification.
Therefore we need to disable vector intrinsics here to be able to compile
core for this target.
2026-02-05 13:36:18 +01:00
Jonathan Brouwer
cb77fcb3a6
Rollup merge of #152133 - Enselic:on-broken-pipe-flag-rename, r=ChrisDenton
library/std: Rename `ON_BROKEN_PIPE_FLAG_USED` to `ON_BROKEN_PIPE_USED`

This commit is a pure internal rename and does not change any functionality.

The `FLAG_` part of `ON_BROKEN_PIPE_FLAG_USED` comes from that the compiler flag `-Zon-broken-pipe=...` is used to enable the feature.

Remove the `FLAG_` part so the name works both for the current compiler flag `-Zon-broken-pipe=...` and for the upcoming [Externally Implementable Item `#[std::io::on_broken_pipe]`](https://github.com/rust-lang/rust/pull/150591) PR. This makes the diff of that PR smaller.

The local variable name `sigpipe_attr_specified` comes from way back when the feature was controlled with an `fn main()` attribute called `#[unix_sigpipe = "..."]`. Rename that too.
2026-02-05 12:17:03 +01:00
Folkert de Vries
cfcf20fe90
Merge pull request #2018 from rust-lang/revert-2014-llvm-22-madd
Revert "Revert "Use LLVM intrinsics for `madd` intrinsics""
2026-02-05 09:33:31 +00:00
The rustc-josh-sync Cronjob Bot
32b93d1f94 Merge ref 'db3e99bbab' from rust-lang/rust
Pull recent changes from https://github.com/rust-lang/rust via Josh.

Upstream ref: rust-lang/rust@db3e99bbab
Filtered ref: rust-lang/stdarch@4749411ab3
Upstream diff: 873d4682c7...db3e99bbab

This merge was created using https://github.com/rust-lang/josh-sync.
2026-02-05 04:37:20 +00:00
The rustc-josh-sync Cronjob Bot
8c404a7649 Prepare for merging from rust-lang/rust
This updates the rust-version file to db3e99bbab.
2026-02-05 04:37:12 +00:00
Zalathar
6970849fee Disable flaky test oneshot::recv_timeout_before_send 2026-02-05 12:38:23 +11:00
Martin Nordholts
01c0c147c5 library/std: Rename ON_BROKEN_PIPE_FLAG_USED to ON_BROKEN_PIPE_USED
This commmit is a pure rename and does not change any functionality.

The `FLAG_` part of `ON_BROKEN_PIPE_FLAG_USED` comes from that the
compiler flag `-Zon-broken-pipe=...` is used to enable the feature.

Remove the `FLAG_` part so the name works both for the flag
`-Zon-broken-pipe=...` and for the upcoming Externally Implementable
Item `#[std::io::on_broken_pipe]`. This makes the diff of that PR
smaller.

The local variable name `sigpipe_attr_specified` comes from way back
when the feature was controlled with an `fn main()` attribute called
`#[unix_sigpipe = "..."]`. Rename that too.
2026-02-04 19:47:51 +01:00
Jonathan Brouwer
3184d55536
Rollup merge of #152083 - chenyukang:yukang-fix-set-times-nofollow-on-windows, r=ChrisDenton
Fix set_times_nofollow for directory on windows

Fix issue from:
https://github.com/rust-lang/rust/issues/147455#issuecomment-3841311858

old code `opts.write(true)` on Windows requests `GENERIC_WRITE` access, replace with `opts.access_mode(c::FILE_WRITE_ATTRIBUTES)` to get minimal permission.

r? @joshtriplett
2026-02-04 14:39:28 +01:00
yukang
8e62b1d0e1 Fix set_times_nofollow for directory on windows 2026-02-04 03:58:26 +00:00
Jonathan Brouwer
881604a61a
Rollup merge of #152029 - RalfJung:miri-socket-tests, r=Mark-Simulacrum
disable socket tests in Miri

https://github.com/rust-lang/rust/pull/150428 added some tests that do not work in Miri since we do not support sockets.

r? @Mark-Simulacrum
2026-02-03 18:54:50 +01:00
Stuart Cook
37ece9cf9b
Rollup merge of #151109 - tyhdefu:float_bits_const, r=tgross35
fN::BITS constants for feature float_bits_const

Also enables the feature for compiler_builtins as otherwise this causes a warning and conflicts with the Float extension trait.

---
Implementation for rust-lang/rust#151073

Feature flag: `#![feature(float_bits_const)]`

Note that this is likely to conflict with some extension traits, as it has with compiler builtins. However, assuming correct values for the constants, they are either `u32`, the same type, which should not cause a problem (as shown by enabling the feature for compiler_builtins), or a different type (e.g. `usize`), which should cause a compiler error. Either way this should never change behaviour unless the extension trait implemented an incorrect value.

Also note that it doesn't seem to be possible to put multiple unstable attributes on an item, so `f128::BITS` and `f16::BITS` are gated behind the feature flags for those primitives, rather than `#![feature(float_bits_const)]`
2026-02-03 21:58:39 +11:00
Ralf Jung
079913ec71 disable socket tests in Miri 2026-02-03 09:02:39 +01:00
bors
46c86aef65 Auto merge of #152025 - jhpratt:rollup-Kxb6k3Y, r=jhpratt
Rollup of 11 pull requests

Successful merges:

 - rust-lang/rust#151378 (Codegen tests for Arm Cortex-R82)
 - rust-lang/rust#151936 (Move the `fingerprint_style` special case into `DepKindVTable` creation)
 - rust-lang/rust#152018 (Move bigint helper tracking issues)
 - rust-lang/rust#151958 (Add codegen test for SLP vectorization)
 - rust-lang/rust#151974 (Update documentation for `Result::ok()`)
 - rust-lang/rust#151975 (Work around rustfmt giving up on a large expression)
 - rust-lang/rust#151990 (Fix missing unused_variables lint when using a match guard)
 - rust-lang/rust#151995 (stabilize ptr_as_ref_unchecked)
 - rust-lang/rust#151999 (attribute parsing: pass recovery mode to Parser.)
 - rust-lang/rust#152009 (Port rustc_preserve_ub_checks to attr parser)
 - rust-lang/rust#152022 (rustc-dev-guide subtree update)

Failed merges:

 - rust-lang/rust#151968 (Remove `HasDepContext` by merging it into `QueryContext`)
2026-02-03 04:44:02 +00:00
Jacob Pratt
55590344ba
Rollup merge of #151995 - RalfJung:ptr_as_ref_unchecked, r=jhpratt
stabilize ptr_as_ref_unchecked

FCP passed in rust-lang/rust#122034.

Closes rust-lang/rust#122034.
2026-02-02 23:12:07 -05:00
Jacob Pratt
7fd1009ece
Rollup merge of #151974 - clundin55:doc-fix, r=jhpratt
Update documentation for `Result::ok()`

The term of "discard" is misleading. An error is not discarded but converted to an `Option::None`.
2026-02-02 23:12:06 -05:00
ltdk
28feae0c87 Move bigint helper tracking issues 2026-02-02 18:45:26 -05:00
Ralf Jung
6490e0ecb5 stabilize ptr_as_ref_unchecked 2026-02-02 19:47:32 +01:00
Jonathan Brouwer
22b2913464
Rollup merge of #151979 - nicholasbishop:push-ssmqyutnpypo, r=jhpratt
Fix uninitialized UEFI globals in tests

Export globals via a `doc(hidden)` module. In test code, use the globals from `realstd` so that they are properly initialized.

CC @Ayush1325
2026-02-02 18:52:16 +01:00
Jonathan Brouwer
f0355ccf2b
Rollup merge of #151825 - joshuarayton:more-float-constants, r=tgross35
more float constants

Add constants discussed in rust-lang/rust#146939 https://github.com/rust-lang/libs-team/issues/661
Retry of rust-lang/rust#146934

r? @tgross35
2026-02-02 18:52:13 +01:00
Folkert de Vries
54641efc68
add vpmaddwd tests back in 2026-02-02 17:05:35 +01:00
Folkert de Vries
f4ce247bc2
Merge pull request #2009 from folkertdev/aarch64-vld1-tests
test the `vld1*` functions
2026-02-02 13:47:28 +00:00
Folkert de Vries
821f139a29
Revert "Revert "Use LLVM intrinsics for madd intrinsics"" 2026-02-02 10:51:20 +01:00
Nicholas Bishop
59868c1394 Fix uninitialized UEFI globals in tests
Export globals via a `doc(hidden)` module. In test code, use the globals
from `realstd` so that they are properly initialized.
2026-02-01 23:48:27 -05:00
bors
a60d12cbcc Auto merge of #151971 - Zalathar:rollup-KwKpKLY, r=Zalathar
Rollup of 11 pull requests

Successful merges:

 - rust-lang/rust#151756 (Avoid miri error in `slice::sort` under Stacked Borrows)
 - rust-lang/rust#147400 (TryFrom<integer> for bool)
 - rust-lang/rust#150993 (std: sys: uefi: os: Implement join_paths)
 - rust-lang/rust#151483 (Add regression test for issue rust-lang/rust#138225)
 - rust-lang/rust#151568 (Update hexagon target linker configurations)
 - rust-lang/rust#151725 (Fix outdated Debian Ports ISO reference)
 - rust-lang/rust#151895 (Move UI tests batch)
 - rust-lang/rust#151923 (Fix ICE when projection error reporting sees opaque alias terms)
 - rust-lang/rust#151947 (Include assoc const projections in CFI trait object)
 - rust-lang/rust#151948 (Handle unbalanced delimiters gracefully in make_attr_token_stream)
 - rust-lang/rust#151963 (Add regression test for negative literal in a range of unsigned type)
2026-02-02 04:41:32 +00:00
Carl Lundin
f3b7a1a9d8 Update documentation for Result::ok()
The term of "discard" is misleading. An error is not discarded but
converted to an `Option::None`.
2026-02-01 18:01:24 -08:00
Stuart Cook
512afea218
Rollup merge of #150993 - Ayush1325:uefi-join-path, r=Mark-Simulacrum
std: sys: uefi: os: Implement join_paths

- Tested using OVMF using QEMU.

@rustbot label +O-UEFI
2026-02-02 10:28:31 +11:00
Stuart Cook
e6e2d39136
Rollup merge of #147400 - hkBst:convert-1, r=Mark-Simulacrum
TryFrom<integer> for bool

I noticed the manual TryFrom implementation in [this video from RustConf 2025](https://youtu.be/cOP219vkax8?list=PL2b0df3jKKiRFEuVNk76ufXagOgEJ9sBZ&t=1917) and thought I'd add it.
2026-02-02 10:28:30 +11:00
Stuart Cook
a57663ea65
Rollup merge of #151756 - Voultapher:fix-box-retag-in-sort, r=Mark-Simulacrum
Avoid miri error in `slice::sort` under Stacked Borrows

See comment in code.

Fixes: https://github.com/rust-lang/rust/issues/151728
2026-02-02 10:28:29 +11:00
bors
92ea9b29d1 Auto merge of #150428 - kouhe3:win-af-unix-2, r=Mark-Simulacrum
UnixStream/UnixListener on Windows 

Hi, I re impl this. Hope you test it.
2026-02-01 23:17:22 +00:00
Joshua Rayton
caaee92855
more float constants: sqrt(5), 1/sqrt(5) 2026-02-01 17:09:40 +00:00
bors
8340622e14 Auto merge of #151543 - GuillaumeGomez:more-proc-macro-literal-methods, r=Amanieu
Add new `byte_value` and `char_value` methods to `proc_macro::Literal`

Part of https://github.com/rust-lang/rust/issues/136652.

It adds two more methods to get unescaped `u8` and `char` from `proc_macro::Literal`.

r? @Amanieu
2026-02-01 15:46:27 +00:00
Folkert de Vries
f5540adde9
add test for multiply by one pattern 2026-02-01 16:28:16 +01:00
Guillaume Gomez
55e3d2206a Improve new proc-macro methods name 2026-02-01 15:05:57 +01:00
Folkert de Vries
141a867b02
Revert "Use LLVM intrinsics for madd intrinsics"
This reverts commit 32146718741ee22ff0d54d21b9ab60353014c980.
2026-02-01 14:20:05 +01:00
Folkert de Vries
794810f897
use more capable macro for wide store/load roundtrip tests 2026-02-01 14:17:35 +01:00
Folkert de Vries
0306275849
use macro for wide store/load roundtrip tests 2026-02-01 14:17:00 +01:00
Folkert de Vries
a208e6c887
maybe fix aarch64be unsigned vector tuple loads 2026-02-01 13:38:36 +01:00
Folkert de Vries
24a2833258
test the vld1* functions 2026-02-01 13:38:35 +01:00
Sayantan Chakraborty
4a1094cd11
Merge pull request #2012 from folkertdev/llvm-22-hadds-hsubs
x86: use `intrinsics::simd` for `hadds`/`hsubs`
2026-02-01 07:10:41 +00:00
bors
a1db344c08 Auto merge of #151924 - JonathanBrouwer:rollup-Pqp8PIn, r=JonathanBrouwer
Rollup of 5 pull requests

Successful merges:

 - rust-lang/rust#151886 (Skip unused_allocation lint when method takes &Box<Self>)
 - rust-lang/rust#150300 (Constify `fmt::from_fn`)
 - rust-lang/rust#151102 (Feature-gate `mut ref` patterns in struct pattern field shorthand)
 - rust-lang/rust#151866 (Reorganizing `tests/ui/issues` 10 tests [4/N] )
 - rust-lang/rust#151890 (Re-export `hashbrown::hash_table` from `rustc_data_structures`)
2026-01-31 23:56:07 +00:00
Folkert de Vries
e40ae4fe2c
x86: use intrinsics::simd for hadds/hsubs 2026-01-31 22:37:22 +01:00
Jonathan Brouwer
f580ca88ee
Rollup merge of #150300 - EFanZh:patch-1, r=dtolnay,tgross35
Constify `fmt::from_fn`

See <https://github.com/rust-lang/rust/issues/117729#issuecomment-3683047620>.
2026-01-31 21:42:46 +01:00
bors
905b926967 Auto merge of #151622 - scottmcm:elide-more-transmutes, r=cjgillot
GVN: Elide more intermediate transmutes

We already skipped intermediate steps like `u32` or `i32` that support any (initialized) value.

This extends that to also allow skipping intermediate steps whose values are a superset of either the source or destination type.  Most importantly, that means that `usize` → `NonZeroUsize` → `ptr::Alignment` and `ptr::Alignment` → `NonZeroUsize` → `usize` can skip the middle because `NonZeroUsize` is a superset of `Alignment`.

Then `Alignment::as_usize` is updated to take advantage of that and let us remove some more locals in a few places.

r? cjgillot
2026-01-31 20:42:37 +00:00
Amanieu d'Antras
c1196d4333
Merge pull request #2010 from folkertdev/powerpc-vnmsub-llvm-22
powerpc: implement `vnmsubfp` using `intrinsics::simd`
2026-01-31 19:43:04 +00:00
Amanieu d'Antras
5b8b7f577b
Merge pull request #2011 from folkertdev/wasm-narrow-llvm-22
wasm: use `intrinsics::simd` for the narrow functions
2026-01-31 19:40:55 +00:00
Folkert de Vries
ebc618aab5
wasm: use intrinsics::simd for the narrow functions 2026-01-31 18:47:56 +01:00
Folkert de Vries
9ea3034b58
powerpc: implement vnmsubfp using intrinsics::simd 2026-01-31 17:44:08 +01:00
kouhe3
1689fcd1cc feat(windows): add Unix domain socket support
This commit introduces initial, unstable support for Unix domain sockets
(UDS) on Windows, behind the `windows_unix_domain_sockets` feature gate

Added types:
- `std::os::windows::net::SocketAddr`: represents a UDS address with support
  for pathname addresses (abstract and unnamed are parsed but not yet fully
  supported).
- `std::os::windows::net::UnixListener`: server-side UDS listener.
- `std::os::windows::net::UnixStream`: client/server stream for UDS.

Key features:
- Binding and connecting using filesystem paths.
- Basic I/O via `Read`/`Write`.
- Address querying (`local_addr`, `peer_addr`).
- Non-blocking mode, timeouts, and socket duplication.
- Includes basic test coverage for smoke, echo, path length, and bind reuse.
2026-01-31 18:36:49 +08:00
Jacob Pratt
4b850fa94e
Rollup merge of #151838 - ionicmc-rs:patch-1, r=jhpratt
Fix typo for Maybe dangling docs

Boxe's -> Box's
2026-01-30 22:52:22 -05:00