Skip to content

Conversation

jhpratt
Copy link
Member

@jhpratt jhpratt commented Jul 2, 2025

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

xizheyin and others added 30 commits June 2, 2025 17:45
The skipped test passes since nightly-2024-11-29. Let's stop skipping
it to increase the chance of detecing a regression.
Except for unix they are all copies of the existing non platform
specific implementation. This is the only way since tidy does not allow
`#[cfg(target_os = ` in src/thread/mod.rs. Once this is merged more
specializations will follow.
Co-authored-by: Jonas Böttiger <[email protected]>

- use the internal platform specific Instant::CLOCK_ID
- skip allow(unused) on on platform that uses it such that it
can not become dead code
- sleep_until: remove leftover links
- In contradiction to nanosleep clock_nanosleep returns the error
  directly and does not require a call to `os::errno()`.
- The last argument to clock_nanosleep can be NULL removing the need
  for mutating the timespec.
- Missed an `allow(unused)` that could be made conditional.
Specialize sleep_until implementation for unix (except mac)

related tracking issue: rust-lang#113752
Supersedes rust-lang#118480 for the reasons see: rust-lang#113752 (comment)

Replaces the generic catch all implementation with target_os specific ones for: linux/netbsd/freebsd/android/solaris/illumos etc. Other platforms like wasi, macos/ios/tvos/watchos and windows will follow in later separate PR's (once this is merged).
Explain `TOCTOU` on the top of `std::fs`, and reference it in functions

Fixes rust-lang#141837

r? ``@workingjubilee``
…ilee

Expose elf abi on ppc64 targets

Fixes rust-lang#60617 (after MCP rust-lang/compiler-team#885 is accepted) by exposing the abi information on ppc64 targets.
Conditional compilation can now use `cfg(target_abi = "elfv1")` or `cfg(target_abi = "elfv2")` to determine the abi in use.

Technical details are included in the other PR rust-lang#142598
ci: aarch64-gnu: Stop skipping `panic_abort_doc_tests`

The skipped test passes since `nightly-2024-11-29`. See rust-lang#123733 (comment) and rust-lang#123733 (comment) for more info.

Let's stop skipping it to increase the chance of detecting a regression.

r? ``@cuviper`` who added the skip in rust-lang#123828

Also see rust-lang#142304 for an alternative regression test that I am hoping to also land in the near future to complement the test we now stop skipping, but I need to investigate that setup more.
jhpratt added 5 commits July 2, 2025 03:54
…-bitcast, r=workingjubilee

fix bitcast of single-element SIMD vectors

in effect this reverts rust-lang#142768 and adds additional tests. That PR relaxed the conditions on an early return in an incorrect way that would create broken LLVM IR.

https://godbolt.org/z/PaaGWTv5a

```rust
#![feature(repr_simd)]

#[repr(simd)]
#[derive(Clone, Copy)]
struct S([i64; 1]);

#[no_mangle]
pub extern "C" fn single_element_simd(b: S) -> i64 {
    unsafe { std::mem::transmute(b) }
}
```
at the time of writing generates this LLVM IR, where the type of the return is different from the function's return type.

```llvm
define noundef i64 ``@single_element_simd(<1`` x i64> %b) unnamed_addr {
start:
  ret <1 x i64> %b
}
```

The test output is actually the same for the existing tests, showing that the change didn't actually matter for any tested behavior. It is probably a bit faster to do the early return, but, well, it's incorrect in general.

zullip thread: [#t-compiler > Is transmuting a &rust-lang#96;T&rust-lang#96; to &rust-lang#96;Tx1&rust-lang#96; (one-element SIMD vector) UB?](https://rust-lang.zulipchat.com/#narrow/channel/131828-t-compiler/topic/Is.20transmuting.20a.20.60T.60.20to.20.60Tx1.60.20.28one-element.20SIMD.20vector.29.20UB.3F/with/526262799)
cc ``@sayantn``
r? ``@scottmcm``
…r=workingjubilee

Align attr fixes

- Remove references to the superseded `repr(align)` syntax
- Allow the attribute on fn items in `extern` blocks
- Test attribute in combination with `async fn` and `dyn`

r? workingjubilee

``@rustbot`` label A-attributes F-fn_align T-compiler
…e, r=oli-obk

Don't recompute `DisambiguatorState` for every RPITIT in trait definition

The `associated_type_for_impl_trait_in_trait` currently needs to rerun the `RPITVisitor` for every RPITIT to compute its disambiguator.

Instead of synthesizing all of the RPITITs def ids one at a time in different queries, just synthesize them inside of the `associated_types_for_impl_traits_in_associated_fn` query. There we can just share the same `DisambiguatorState` for all the RPITITs in one function signature.

r? ``@Zoxc`` or ``@oli-obk`` cc rust-lang#140453
Use the correct export kind for __rust_alloc_error_handler_should_panic

Fixes rust-lang#143253

`__rust_alloc_error_handler_should_panic` is a static but was being exported as a function.

For most targets this doesn't matter, but Arm64EC Windows uses different decorations for exported variables vs functions, hence it fails to link when `-Z oom=abort` is enabled.

Fix is to export the symbol as data.

r? ``@bjorn3``
ci: support optional jobs

try-job: optional-mingw-check-1
@rustbot rustbot added A-attributes Area: Attributes (`#[…]`, `#![…]`) A-testsuite Area: The testsuite used to check the correctness of rustc O-hermit Operating System: Hermit O-itron Operating System: ITRON O-SGX Target: SGX O-unix Operating system: Unix-like O-wasi Operating system: Wasi, Webassembly System Interface O-wasm Target: WASM (WebAssembly), http://webassembly.org/ O-windows Operating system: Windows S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. labels Jul 2, 2025
@jhpratt
Copy link
Member Author

jhpratt commented Jul 2, 2025

@bors r+ rollup=never p=5

@rustbot rustbot added the rollup A PR which is a rollup label Jul 2, 2025
@bors
Copy link
Collaborator

bors commented Jul 2, 2025

📌 Commit f609f8c has been approved by jhpratt

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jul 2, 2025
@bors
Copy link
Collaborator

bors commented Jul 2, 2025

⌛ Testing commit f609f8c with merge 77b41b0...

bors added a commit that referenced this pull request Jul 2, 2025
Rollup of 11 pull requests

Successful merges:

 - #141829 (Specialize sleep_until implementation for unix (except mac))
 - #141847 (Explain `TOCTOU` on the top of `std::fs`, and reference it in functions)
 - #142138 (Add `Vec::into_chunks`)
 - #142321 (Expose elf abi on ppc64 targets)
 - #142886 (ci: aarch64-gnu: Stop skipping `panic_abort_doc_tests`)
 - #143038 (avoid suggesting traits from private dependencies)
 - #143194 (fix bitcast of single-element SIMD vectors)
 - #143206 (Align attr fixes)
 - #143258 (Don't recompute `DisambiguatorState` for every RPITIT in trait definition)
 - #143260 (Use the correct export kind for __rust_alloc_error_handler_should_panic)
 - #143274 (ci: support optional jobs)

r? `@ghost`
`@rustbot` modify labels: rollup
@rust-log-analyzer
Copy link
Collaborator

The job dist-various-2 failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)

error[E0412]: cannot find type `Instant` in this scope
  --> library/std/src/sys/pal/wasm/../unsupported/thread.rs:29:35
   |
29 |     pub fn sleep_until(_deadline: Instant) {
   |                                   ^^^^^^^ not found in this scope
   |
help: consider importing one of these structs
   |
1  + use crate::sys::time::Instant;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-attributes Area: Attributes (`#[…]`, `#![…]`) A-testsuite Area: The testsuite used to check the correctness of rustc O-hermit Operating System: Hermit O-itron Operating System: ITRON O-SGX Target: SGX O-unix Operating system: Unix-like O-wasi Operating system: Wasi, Webassembly System Interface O-wasm Target: WASM (WebAssembly), http://webassembly.org/ O-windows Operating system: Windows rollup A PR which is a rollup S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.