Skip to content

Rollup of 12 pull requests #139657

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 28 commits into from
Apr 11, 2025
Merged

Rollup of 12 pull requests #139657

merged 28 commits into from
Apr 11, 2025

Conversation

Zalathar
Copy link
Contributor

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

madsmtm and others added 28 commits March 24, 2025 23:22
Currently in case of a Trait object in closure parameter, the compiler
suggests either to use a reference, which is correct or to use an
`impl Trait` which is not. Do not emit this suggestion when the parameter
is part of a closure.
The `//@ needs-crate-type: $crate_types...` directive takes a
comma-separated list of crate types that the target platform must
support in order for the test to be run.
…directives

Not all existing tests are converted, I only updated ones that I can
easily find via directive comments.
Includes the following changes:

* Avoid OOB access in `memcpy` and `memmove` [1]
* Enable intrinsics on AVR [2]
* `libm` updates to avoid using `core::arch` vector intrinsics [3]
* Re-enable `f16` on aarch64 without Neon [4]

[1]: rust-lang/compiler-builtins#799
[2]: rust-lang/compiler-builtins#791
[3]: rust-lang/compiler-builtins#814
[4]: rust-lang/compiler-builtins#809
llvm/llvm-project@5ee1c0b updates llvm
to match the documented calling convention to pass f128 indirectly.

@rustbot label llvm-main
The commit adds "associated" to the description of associated types and
associated consts, to match the description of associated functions.
This increases error message precision and consistency with
`AssocKind::fmt`.

The commit also notes an imperfection in `AssocKind::fmt`; fixing this
imperfection is possible but beyond the scope of this PR.
…, r=scottmcm

add `core::intrinsics::simd::{simd_extract_dyn, simd_insert_dyn}`

fixes rust-lang#137372

adds `core::intrinsics::simd::{simd_extract_dyn, simd_insert_dyn}`, which contrary to their non-dyn counterparts allow a non-const index. Many platforms (but notably not x86_64 or aarch64) have dedicated instructions for this operation, which stdarch can emit with this change.

Future work is to also make the `Index` operation on the `Simd` type emit this operation, but the intrinsic can't be used directly. We'll need some MIR shenanigans for that.

r? `@ghost`
…gross35

rustc_target: update x86_win64 to match the documented calling convention for f128

llvm/llvm-project@5ee1c0b updates llvm to match the documented calling convention to pass f128 indirectly. This change makes us do that on all versions of LLVM, not just starting with LLVM 21.

`@rustbot` label llvm-main

try-job: dist-x86_64-msvc
try-job: dist-x86_64-mingw
try-job: x86_64-msvc-1
try-job: x86_64-msvc-2
try-job: x86_64-mingw-1
try-job: x86_64-mingw-2
Allow drivers to supply a list of extra symbols to intern

Allows adding new symbols as `const`s in external drivers, desirable in Clippy so we can use them in patterns to replace code like https://github.com/rust-lang/rust/blob/75530e9f72a1990ed2305e16fd51d02f47048f12/src/tools/clippy/clippy_lints/src/casts/cast_ptr_alignment.rs#L66

The Clippy change adds a couple symbols as a demo, the exact `clippy_utils` API and replacing other usages can be done on the Clippy side to minimise sync conflicts

---

try-job: aarch64-gnu
Test linking and running `no_std` binaries

I looked around, but it seems that we do not have a test that tests a `#![no_std]` + `#![no_main]` binary. So now I've added one. Motivated by discussion in [this Zulip thread](https://rust-lang.zulipchat.com/#narrow/channel/219381-t-libs/topic/Provide.20.60__isPlatformVersionAtLeast.60.20in.20.60std.60.3F/with/507870028).

r? ```@tgross35```

try-job: arm-android
try-job: armhf-gnu
try-job: dist-ohos
try-job: x86_64-mingw-1
…trait_in_closure_params, r=Noratrieb

Don't suggest the use of  `impl Trait` in closure parameter

Fixes rust-lang#138932
doc changes: debug assertions -> overflow checks

This PR is for the following issue:
rust-lang#108131

has some changes in docs
…e-type, r=onur-ozkan

Introduce a `//@ needs-crate-type` compiletest directive

The `//@ needs-crate-type: $crate_types...` directive takes a comma-separated list of crate types that the target platform must support in order for the test to be run. This allows the test writer to semantically convey that the ignore condition is based on target crate type needs, instead of using a general purpose `//@ ignore-$target` directive (often without comment).

Fixes rust-lang#132309.

### Example

```rs
//@ needs-crate-type: dylib (ignored on e.g. wasm32-unknown-unknown)
//@ compile-flags: --crate-type=dylib

fn foo() {}
```

### Review advice

- Best reviewed commit-by-commit.
- The impl is not very clean, I briefly attempted to clean up the directive handling but found that more invasive changes are needed, so I'd like to not block on the cleanup for now.

try-job: test-various
try-job: armhf-gnu
Deeply normalize obligations in `BestObligation` folder

Built on rust-lang#139513.

This establishes a somewhat rough invariant that the `Obligation`'s predicate is always deeply normalized in the folder; when we construct a new obligation we normalize it.

Putting this up for discussion since it does affect some goals.

r? lcnr
…, r=onur-ozkan

bootstrap: improve `channel` handling

Fixes rust-lang#139569

See [this comment](rust-lang#139574 (comment)) for the explanation of this bug.
Update `compiler-builtins` to 0.1.153

Includes the following changes:

* Avoid OOB access in `memcpy` and `memmove` [1]
* Enable intrinsics on AVR [2]
* `libm` updates to avoid using `core::arch` vector intrinsics [3]
* Re-enable `f16` on aarch64 without Neon [4]

[1]: rust-lang/compiler-builtins#799
[2]: rust-lang/compiler-builtins#791
[3]: rust-lang/compiler-builtins#814
[4]: rust-lang/compiler-builtins#809
…er, r=compiler-errors

Allow parenthesis around inferred array lengths

In rust-lang#135272 it was noticed that we weren't handling `Vec<(((((_)))))>` correctly under the new desugaring for `generic_arg_infer`, this had to be fixed in order to not regress stable code for types that should continue working. This has the side effect of *also* allowing the following to work:
```rust
#![feature(generic_arg_infer)]
struct Bar<const N: usize>;
fn main() {
    let a: Bar<((_))> = Bar::<10>;
}
```

However I did not make the same change for array lengths resulting in the following not compiling:
```rust
#![feature(generic_arg_infer)]
fn main() {
    let a: [u8; (((_)))] = [2; 2];
    let a: [u8; 2] = [2; (((((_)))))];
}
```

This is rather inconsistent as parenthesis around `_` *are* supported for const args to non-arrays, and type args. This PR fixes this allowing the above example to compile. No stable impact.

r? compiler-errors
…piler-errors

Improve `AssocItem::descr`.

The commit adds "associated" to the description of associated types and associated consts, to match the description of associated functions. This increases error message precision and consistency with `AssocKind::fmt`.

The commit also notes an imperfection in `AssocKind::fmt`; fixing this imperfection is possible but beyond the scope of this PR.

r? `@estebank`
@rustbot rustbot added A-compiletest Area: The compiletest test runner A-rustc-dev-guide Area: rustc-dev-guide labels Apr 11, 2025
@rustbot rustbot added A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler 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. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver) rollup A PR which is a rollup labels Apr 11, 2025
@Zalathar
Copy link
Contributor Author

@bors r+ rollup=never p=5

@bors
Copy link
Collaborator

bors commented Apr 11, 2025

📌 Commit 96d282c has been approved by Zalathar

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 Apr 11, 2025
@bors
Copy link
Collaborator

bors commented Apr 11, 2025

⌛ Testing commit 96d282c with merge 18a029c...

@bors
Copy link
Collaborator

bors commented Apr 11, 2025

☀️ Test successful - checks-actions
Approved by: Zalathar
Pushing 18a029c to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Apr 11, 2025
@bors bors merged commit 18a029c into rust-lang:master Apr 11, 2025
7 checks passed
@rustbot rustbot added this to the 1.88.0 milestone Apr 11, 2025
@Zalathar Zalathar deleted the rollup-6oh6f9q branch April 11, 2025 07:34
Copy link

What is this? This is an experimental post-merge analysis report that shows differences in test outcomes between the merged PR and its parent PR.

Comparing e62d47d (parent) -> 18a029c (this PR)

Test differences

Show 15 test diffs

Stage 0

  • header::tests::test_supported_crate_types: [missing] -> pass (J0)

Stage 1

  • [codegen] tests/codegen/simd/extract-insert-dyn.rs: [missing] -> pass (J4)
  • [ui] tests/ui/no_std/simple-runs.rs: [missing] -> pass (J4)
  • [ui] tests/ui/traits/dont-suggest-impl-as-closure-arg.rs: [missing] -> pass (J4)

Stage 2

  • [ui] tests/ui/invalid-compile-flags/crate-type-flag.rs#cdylib: ignore (ignored when the target environment is musl ((cdylib is supported, but musl libc is statically linked by default))) -> ignore (skipping test as target does not support all of the crate types ["cdylib"]) (J1)
  • [ui] tests/ui/invalid-compile-flags/crate-type-flag.rs#dylib: ignore (ignored when the target environment is musl ((dylib is supported, but musl libc is statically linked by default))) -> ignore (skipping test as target does not support all of the crate types ["dylib"]) (J1)
  • [ui] tests/ui/linkage-attr/issue-12133-3.rs: ignore (ignored when the target environment is musl) -> ignore (skipping test as target does not support all of the crate types ["dylib"]) (J1)
  • [ui] tests/ui/lint/non-snake-case/lint-non-snake-case-crate.rs#cdylib_: ignore (ignored when the target environment is musl) -> ignore (skipping test as target does not support all of the crate types ["cdylib"]) (J1)
  • [ui] tests/ui/lint/non-snake-case/lint-non-snake-case-crate.rs#dylib_: ignore (ignored when the target environment is musl) -> ignore (skipping test as target does not support all of the crate types ["dylib"]) (J1)
  • [ui] tests/ui/panic-runtime/abort-link-to-unwind-dylib.rs: ignore (ignored when the target environment is musl (no dylibs here)) -> ignore (skipping test as target does not support all of the crate types ["dylib"]) (J1)
  • [ui] tests/ui/no_std/simple-runs.rs: [missing] -> pass (J2)
  • [ui] tests/ui/traits/dont-suggest-impl-as-closure-arg.rs: [missing] -> pass (J2)
  • [codegen] tests/codegen/simd/extract-insert-dyn.rs: [missing] -> pass (J3)

Additionally, 2 doctest diffs were found. These are ignored, as they are noisy.

Job group index

Job duration changes

  1. dist-aarch64-apple: 4700.0s -> 6002.7s (27.7%)
  2. dist-x86_64-apple: 8833.8s -> 10583.7s (19.8%)
  3. arm-android: 5578.7s -> 5304.0s (-4.9%)
  4. dist-powerpc64-linux: 5533.2s -> 5263.3s (-4.9%)
  5. dist-apple-various: 6335.0s -> 6616.5s (4.4%)
  6. x86_64-gnu-tools: 6091.6s -> 5863.2s (-3.7%)
  7. aarch64-apple: 3836.4s -> 3706.5s (-3.4%)
  8. dist-powerpc64le-linux: 9403.2s -> 9720.6s (3.4%)
  9. dist-armhf-linux: 5129.6s -> 5297.2s (3.3%)
  10. dist-i586-gnu-i586-i686-musl: 5022.8s -> 5185.0s (3.2%)
How to interpret the job duration changes?

Job durations can vary a lot, based on the actual runner instance
that executed the job, system noise, invalidated caches, etc. The table above is provided
mostly for t-infra members, for simpler debugging of potential CI slow-downs.

@rust-timer
Copy link
Collaborator

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#137447 add `core::intrinsics::simd::{simd_extract_dyn, simd_insert… 0d8f70bc13b7f0775f5962b23fa530642044edbb (link)
#138182 rustc_target: update x86_win64 to match the documented call… 7aad1313fdb8bcffaa93f26059eb2e48356dc087 (link)
#138682 Allow drivers to supply a list of extra symbols to intern 9cd9667fc74a1731ad6901134327c8b7275e38a0 (link)
#138904 Test linking and running no_std binaries e8d4a970c87e25533c9b6584862e88011d64db55 (link)
#138998 Don't suggest the use of impl Trait in closure parameter fc8a2f20fa65b8586960131eb28cd595ae96a5d4 (link)
#139447 doc changes: debug assertions -> overflow checks 246b956c91e5041a49aeeab7911ab8992a67d9e1 (link)
#139469 Introduce a //@ needs-crate-type compiletest directive 506803a4eed259f0902a007522665fe89c733a3c (link)
#139564 Deeply normalize obligations in BestObligation folder 421ce0763c515896954eb630c9a9612b5500d4f8 (link)
#139574 bootstrap: improve channel handling 0fabbf36f629ec54f9e1a0088e398d3562ebab74 (link)
#139600 Update compiler-builtins to 0.1.153 bf7064c277ec6f9209726e1efe6f22792b70d15a (link)
#139641 Allow parenthesis around inferred array lengths f630cdcdeb52214f551072c8d8d8f462e4ee5aae (link)
#139654 Improve AssocItem::descr. 2e39a7ee087810e16e2a6f8031618686dd28eaca (link)

previous master: e62d47dace

In the case of a perf regression, run the following command for each PR you suspect might be the cause: @rust-timer build $SHA

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (18a029c): comparison URL.

Overall result: no relevant changes - no action needed

@rustbot label: -perf-regression

Instruction count

This benchmark run did not return any relevant results for this metric.

Max RSS (memory usage)

Results (primary 3.2%, secondary -1.5%)

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
3.2% [2.7%, 3.7%] 2
Regressions ❌
(secondary)
0.6% [0.6%, 0.6%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-1.9% [-4.2%, -0.5%] 5
All ❌✅ (primary) 3.2% [2.7%, 3.7%] 2

Cycles

Results (primary -0.8%)

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-0.8% [-0.9%, -0.7%] 3
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -0.8% [-0.9%, -0.7%] 3

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 782.4s -> 781.035s (-0.17%)
Artifact size: 365.96 MiB -> 365.98 MiB (0.00%)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-compiletest Area: The compiletest test runner A-rustc-dev-guide Area: rustc-dev-guide A-testsuite Area: The testsuite used to check the correctness of rustc merged-by-bors This PR was explicitly merged by bors. 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-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler 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. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver)
Projects
None yet
Development

Successfully merging this pull request may close these issues.