Skip to content

Rollup of 7 pull requests #140474

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 19 commits into from
Apr 29, 2025
Merged

Rollup of 7 pull requests #140474

merged 19 commits into from
Apr 29, 2025

Conversation

tgross35
Copy link
Contributor

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

oli-obk and others added 19 commits April 28, 2025 07:36
This patch has deliberately been kept small and simple, to make it easier to
revert if necessary. Further cleanup can take palce after we're confident that
it won't need to be reverted.
LLVM 21 moves to making it more explicit what this function call is
doing, but nothing has changed behaviorally, so for now we just adjust
to using the new name of the function.

@rustbot label llvm-main
With a recent change to the compiler, all instances of `#[naked]` must
now be wrapped in `#[unsafe(naked)]`. The `unwinding` crate, which is
used on Xous for doing unwinding in constrained environments, needed to
be updated to handle this change.

Bump the `unwinding` dependency to 0.2.6, which performs this wrapping.

Signed-off-by: Sean Cross <[email protected]>
This has been disabled due to an LLVM misoptimization with `powi.f16`
[1]. This was fixed upstream and the fix is included in LLVM20, so tests
no longer need to be disabled.

`f16` still remains disabled on MinGW due to the ABI issue.

[1]: llvm/llvm-project#98665
This was missed as part of [1].

[1]: rust-lang#140323
Enable `reliable_f16_math` on x86

This has been disabled due to an LLVM misoptimization with `powi.f16` [1]. This was fixed upstream and the fix is included in LLVM20, so tests no longer need to be disabled.

`f16` still remains disabled on MinGW due to the ABI issue.

[1]: llvm/llvm-project#98665

try-job: x86_64-gnu
try-job: x86_64-gnu-llvm-19-1
try-job: x86_64-gnu-llvm-20-1
implement or-patterns for pattern types

These are necessary to represent `NonZeroI32`, as the range for that is `..0 | 1..`. The `rustc_scalar_layout_range_*` attributes avoided this by just implementing wraparound and having a single `1..=-1` range effectively. See https://rust-lang.zulipchat.com/#narrow/channel/481660-t-lang.2Fpattern-types/topic/.60or.20pattern.60.20representation.20in.20type.20system/with/504217694 for some background discussion

cc rust-lang#123646

r? `@BoxyUwU`
compiletest: Remove the libtest-based executor and its dependency

Now that rust-lang#140288 has landed and the new compiletest executor is used by default, we can now move forward with removing the libtest dependency from compiletest.

My hope is that after landing this, we can configure bootstrap to build compiletest with the pre-built stage0 library by default, instead of the in-tree stage0 library. That would give the stage0 redesign one less thing to worry about.

---

This PR has deliberately been kept small and simple, to make it easier to revert if necessary. Further cleanup can take palce after we're confident that it won't need to be reverted.

r? jieyouxu

Blocker for rust-lang#119899
PassWrapper: adapt for llvm/llvm-project@d3d856ad8469

LLVM 21 moves to making it more explicit what this function call is doing, but nothing has changed behaviorally, so for now we just adjust to using the new name of the function.

`@rustbot` label llvm-main
….6, r=workingjubilee

unwind: bump `unwinding` dependency to 0.2.6

Xous now fails to compile under nightly, due to the recent change where `#[naked]` must now be wrapped in `unsafe(...)`. The `unwinding` crate was updated to account for this.

With the following `bootstrap.toml`:

```
profile = "library"
change-id = 138934

[build]
build-stage = 2
target = ["riscv32imac-unknown-xous-elf"]

[rust]
std-features = ["panic-unwind"]
download-rustc = false
```

The build fails when trying unwinding v0.2.5:
```
$ ./x.py build
[...]
   Compiling unwinding v0.2.5
error: unsafe attribute used without unsafe
   --> /home/user/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/unwinding-0.2.5/src/unwinder/arch/riscv32.rs:176:3
    |
176 | #[naked]
    |   ^^^^^ usage of unsafe attribute
    |
help: wrap the attribute in `unsafe(...)`
    |
176 | #[unsafe(naked)]
    |   +++++++     +

error: could not compile `unwinding` (lib) due to 1 previous error
warning: build failed, waiting for other jobs to finish...
Build completed unsuccessfully in 0:06:26
$
```

This patch updates `unwinding` to v0.2.6, which now wraps all issues of `naked` in `unsafe()`.
…, r=jieyouxu

Update documentation for `fn target_config`

This was missed as part of [1].

[1]: rust-lang#140323
Replace the \01__gnu_mcount_nc to LLVM intrinsic for additional ARM targets

This is an extension to rust-lang#113814 which seems to have missed two targets which also need this patch for instrumentation with `-Z instrument-mcount` to work correctly.

For anyone who might stumble over this issue again in the future: As a workaround one can dump the current target configuration using

```
rustc +nightly -Z unstable-options --target armv7-unknown-linux-gnueabihf --print target-spec-json
```

(assuming `armv7-unknown-linux-gnueabihf` is the target to build for) add the line

```
    "llvm-mcount-intrinsic": "llvm.arm.gnu.eabi.mcount",
```

and compile with

```
RUSTFLAGS="-Z instrument-mcount -C passes=ee-instrument<post-inline>" cargo +nightly build -Z build-std --target <path to directory with modified target config>/armv7-unknown-linux-gnueabihf.json
```

It might be necessary to set the compiler for cross compiling using something like

```
export TARGET_CC=arm-linux-gnueabihf-gcc
```
@rustbot rustbot added A-compiletest Area: The compiletest test runner 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. rollup A PR which is a rollup labels Apr 29, 2025
@tgross35
Copy link
Contributor Author

@bors r+ rollup=never p=7

@bors
Copy link
Collaborator

bors commented Apr 29, 2025

📌 Commit ff6a980 has been approved by tgross35

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 29, 2025
@tgross35
Copy link
Contributor Author

Whoops, forgot the new priorities

@bors p=5

@bors
Copy link
Collaborator

bors commented Apr 29, 2025

⌛ Testing commit ff6a980 with merge 7450913...

@bors
Copy link
Collaborator

bors commented Apr 29, 2025

☀️ Test successful - checks-actions
Approved by: tgross35
Pushing 7450913 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Apr 29, 2025
@bors bors merged commit 7450913 into rust-lang:master Apr 29, 2025
1 check passed
@rustbot rustbot added this to the 1.88.0 milestone Apr 29, 2025
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 efcbb94 (parent) -> 7450913 (this PR)

Test differences

Show 33091 test diffs

Stage 1

  • any::any_referenced: [missing] -> pass (J0)
  • cell::no_imm_then_borrow_mut: [missing] -> pass (J0)
  • f128::test_algebraic: [missing] -> pass (J0)
  • fmt::builders::debug_tuple::test_nested_non_exhaustive: [missing] -> pass (J0)
  • fmt::test_estimated_capacity: [missing] -> pass (J0)
  • iter::adapters::flatten::test_double_ended_flatten: [missing] -> pass (J0)
  • iter::test_counter_from_iter: [missing] -> pass (J0)
  • mpmc::send_from_outside_runtime: [missing] -> pass (J0)
  • net::ip_addr::test_from_str_ipv6: [missing] -> pass (J0)
  • net::socket_addr::set_scope_id: [missing] -> pass (J0)
  • num::flt2dec::random::exact_f64_random_equivalence_test: [missing] -> pass (J0)
  • num::flt2dec::strategy::grisu::test_to_exact_fixed_str: [missing] -> pass (J0)
  • num::i64::test_le: [missing] -> pass (J0)
  • num::test_try_i16u8: [missing] -> pass (J0)
  • num::test_try_u32u128: [missing] -> pass (J0)
  • num::u64::test_num: [missing] -> pass (J0)
  • ptr::test_ptr_metadata_in_const: [missing] -> pass (J0)
  • rc::get_mut: [missing] -> pass (J0)
  • slice::memchr::matches_begin_reversed: [missing] -> pass (J0)
  • slice::memchr::no_match_reversed: [missing] -> pass (J0)
  • slice::test_chunks_mut_nth: [missing] -> pass (J0)
  • string::test_from_cow_str: [missing] -> pass (J0)
  • test_iter_debug: [missing] -> pass (J0)
  • vec::test_box_zero_allocator: [missing] -> pass (J0)
  • waker::test_waker_getters: [missing] -> pass (J0)
  • btree::set::clone_10k_and_drain_half: [missing] -> pass (J1)
  • sort::tests::unstable::self_cmp_string_descending: [missing] -> pass (J1)
  • sort::tests::unstable::stability_cell_i32_random_d2: [missing] -> pass (J1)
  • str::split_extern_fn: [missing] -> pass (J1)
  • str::trim_start_ascii_char::short_pile_of_poo: [missing] -> pass (J1)
  • vec::bench_dedup_none_10000: [missing] -> pass (J1)
  • sort::tests::stable::correct_1k_random_s95: [missing] -> ignore (J2)
  • sort::tests::stable::correct_i32_random_d1024: [missing] -> ignore (J2)
  • sort::tests::stable::self_cmp_i32_random: [missing] -> ignore (J2)
  • sort::tests::stable::violate_ord_retain_orig_set_i32_random_s95: [missing] -> ignore (J2)
  • sort::tests::unstable::correct_i32_random_d311: [missing] -> ignore (J2)
  • bit_set::tests::grow: [missing] -> pass (J3)
  • errors::verify_ast_lowering_misplaced_impl_trait_1: [missing] -> pass (J3)
  • errors::verify_builtin_macros_concat_idents_missing_args_41: [missing] -> pass (J3)
  • errors::verify_builtin_macros_format_no_arg_named_60: [missing] -> pass (J3)
  • errors::verify_builtin_macros_test_bad_fn_63: [missing] -> pass (J3)
  • errors::verify_incremental_move_dep_graph_36: [missing] -> pass (J3)
  • errors::verify_parse_self_argument_pointer_63: [missing] -> pass (J3)
  • errors::verify_passes_break_inside_coroutine_129: [missing] -> pass (J3)
  • errors::verify_passes_doc_alias_malformed_28: [missing] -> pass (J3)
  • errors::verify_passes_should_be_applied_to_fn_13: [missing] -> pass (J3)
  • markdown::term::tests::test_wrapping_write: [missing] -> pass (J3)
  • maybe_transmutable::tests::safety::src_unsafe_dst_unsafe: [missing] -> pass (J3)
  • session_diagnostics::verify_driver_impl_ice_exclude_cargo_defaults_15: [missing] -> pass (J3)
  • sorted_map::tests::test_insert_presorted_last_elem_equal: [missing] -> pass (J3)
  • spec::tests::i586_unknown_redox: [missing] -> pass (J3)
  • spec::tests::riscv32imafc_unknown_none_elf: [missing] -> pass (J3)
  • spec::tests::thumbv7em_none_eabihf: [missing] -> pass (J3)
  • spec::tests::x86_64_pc_cygwin: [missing] -> pass (J3)
  • tagged_ptr::tests::stable_hash_hashes_as_tuple: [missing] -> pass (J3)
  • f16::test_recip: [missing] -> pass (J5)

Stage 2

  • ascii::test_is_ascii_graphic: pass -> [missing] (J0)
  • available_parallelism: pass -> [missing] (J0)
  • cmp::test_user_defined_eq: pass -> [missing] (J0)
  • collections::btree::map::tests::test_extract_if::empty: pass -> [missing] (J0)
  • collections::btree::map::tests::test_range_backwards_2: pass -> [missing] (J0)
  • f64::test_to_degrees: pass -> [missing] (J0)
  • iter::test_counter_from_iter: pass -> [missing] (J0)
  • num::i16::test_rem_euclid: pass -> [missing] (J0)
  • num::u32::test_from_str: pass -> [missing] (J0)
  • ops::test_range_is_empty: pass -> [missing] (J0)
  • option::option_const_mut: pass -> [missing] (J0)
  • rwlock::test_rw_arc_poison_wr: pass -> [missing] (J0)
  • slice::split_off_first_mut_nonempty: pass -> [missing] (J0)
  • slice::test_splitn_iterator_mut: pass -> [missing] (J0)
  • slice::test_windows_iterator: pass -> [missing] (J0)
  • str::test_chars_debug: pass -> [missing] (J0)
  • vec::max_dont_panic: pass -> [missing] (J0)
  • ascii::long::is_ascii_lowercase: pass -> [missing] (J1)
  • ascii::short::case05_branchless: pass -> [missing] (J1)
  • sort::tests::stable::deterministic_i32_random_d2: pass -> [missing] (J1)
  • sort::tests::unstable::correct_f128_random: pass -> [missing] (J1)
  • str::char_count::emoji_medium::case00_libcore: pass -> [missing] (J1)
  • str::trim_ascii_char::short_ascii: pass -> [missing] (J1)
  • sys::pal::common::tests::heap_allocation_fails: pass -> [missing] (J1)
  • task::test_waker_will_wake_clone: pass -> [missing] (J1)
  • vec::bench_chain_extend_ref: pass -> [missing] (J1)
  • vec::bench_from_fn_0100: pass -> [missing] (J1)
  • sort::tests::unstable::deterministic_string_descending: ignore -> [missing] (J2)
  • sort::tests::unstable::deterministic_string_random_d20: ignore -> [missing] (J2)
  • sort::tests::unstable::stability_i32_random: ignore -> [missing] (J2)
  • error::verify_middle_layout_too_generic_10: pass -> [missing] (J3)
  • errors::verify_codegen_ssa_extract_bundled_libs_convert_name_73: pass -> [missing] (J3)
  • errors::verify_codegen_ssa_invalid_monomorphization_unsupported_symbol_of_size_117: pass -> [missing] (J3)
  • errors::verify_codegen_ssa_no_field_9: pass -> [missing] (J3)
  • errors::verify_parse_eq_field_init_27: pass -> [missing] (J3)
  • errors::verify_parse_modifiers_and_polarity_166: pass -> [missing] (J3)
  • graph::scc::tests::test_big_scc: pass -> [missing] (J3)
  • lints::verify_lint_unused_allocation_mut_99: pass -> [missing] (J3)
  • parser::tests::different_note_spanned_9: pass -> [missing] (J3)
  • spec::tests::i686_unknown_hurd_gnu: pass -> [missing] (J3)
  • spec::tests::riscv64imac_unknown_nuttx_elf: pass -> [missing] (J3)
  • stable_hasher::tests::test_hash_bit_set: pass -> [missing] (J3)
  • tests::bench_copy: pass -> [missing] (J3)
  • f16::test_mul_add: pass -> [missing] (J4)

(and 16454 additional test diffs)

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

Job group index

Test dashboard

Run

cargo run --manifest-path src/ci/citool/Cargo.toml -- \
    test-dashboard 74509131e85a97353c67c503ea32e148a56cf4bd --output-dir test-dashboard

And then open test-dashboard/index.html in your browser to see an overview of all executed tests.

Job duration changes

  1. x86_64-apple-2: 1367.1s -> 4729.7s (246.0%)
  2. test-various: 2281.1s -> 4258.0s (86.7%)
  3. dist-aarch64-linux: 5452.5s -> 7969.7s (46.2%)
  4. x86_64-gnu-aux: 4249.3s -> 6051.7s (42.4%)
  5. aarch64-apple: 3316.4s -> 4261.9s (28.5%)
  6. x86_64-apple-1: 5584.3s -> 6751.0s (20.9%)
  7. dist-powerpc-linux: 5176.7s -> 6231.7s (20.4%)
  8. dist-aarch64-apple: 4752.2s -> 5530.6s (16.4%)
  9. dist-apple-various: 6316.3s -> 6931.6s (9.7%)
  10. armhf-gnu: 4471.4s -> 4778.1s (6.9%)
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
#138344 Enable reliable_f16_math on x86 1b38d82339c3baf3a26ccdf367f30ff95b18ecb1 (link)
#139909 implement or-patterns for pattern types 527f76663d4a37c03bf82b72a5f4ab9153149554 (link)
#140392 compiletest: Remove the libtest-based executor and its depe… de3d5319e16770da9748215a84416974dbac3e1d (link)
#140400 PassWrapper: adapt for llvm/llvm-project@d3d856ad8469 3e1c57cf3ffdde6287270389a43e984153363ff1 (link)
#140422 unwind: bump unwinding dependency to 0.2.6 7e468bd1e5a8298bba75dfd92752459169fdbd69 (link)
#140432 Update documentation for fn target_config 28963dbc908505073e81574d13a14e1fd83c37f1 (link)
#140433 Replace the \01__gnu_mcount_nc to LLVM intrinsic for additi… 18576cbe6b238417c14b456880356b84d2984af4 (link)

previous master: efcbb94dcc

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 (7450913): comparison URL.

Overall result: ❌✅ regressions and improvements - please read the text below

Our benchmarks found a performance regression caused by this PR.
This might be an actual regression, but it can also be just noise.

Next Steps:

  • If the regression was expected or you think it can be justified,
    please write a comment with sufficient written justification, and add
    @rustbot label: +perf-regression-triaged to it, to mark the regression as triaged.
  • If you think that you know of a way to resolve the regression, try to create
    a new PR with a fix for the regression.
  • If you do not understand the regression or you think that it is just noise,
    you can ask the @rust-lang/wg-compiler-performance working group for help (members of this group
    were already notified of this PR).

@rustbot label: +perf-regression
cc @rust-lang/wg-compiler-performance

Instruction count

This is the most reliable metric that we have; it was used to determine the overall result at the top of this comment. However, even this metric can sometimes exhibit noise.

mean range count
Regressions ❌
(primary)
0.3% [0.3%, 0.3%] 1
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-2.9% [-2.9%, -2.9%] 1
Improvements ✅
(secondary)
-0.2% [-0.2%, -0.2%] 2
All ❌✅ (primary) -1.3% [-2.9%, 0.3%] 2

Max RSS (memory usage)

Results (primary -0.2%, secondary 0.7%)

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.7% [0.4%, 1.0%] 3
Regressions ❌
(secondary)
2.4% [0.7%, 5.0%] 7
Improvements ✅
(primary)
-0.6% [-0.9%, -0.4%] 6
Improvements ✅
(secondary)
-3.2% [-4.7%, -2.5%] 3
All ❌✅ (primary) -0.2% [-0.9%, 1.0%] 9

Cycles

Results (primary -1.1%)

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)
-1.1% [-2.8%, -0.4%] 4
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -1.1% [-2.8%, -0.4%] 4

Binary size

Results (primary -1.1%)

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)
-1.1% [-1.1%, -1.1%] 1
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -1.1% [-1.1%, -1.1%] 1

Bootstrap: 763.233s -> 766.94s (0.49%)
Artifact size: 365.38 MiB -> 365.61 MiB (0.06%)

@rustbot rustbot added the perf-regression Performance regression. label Apr 29, 2025
@rust-log-analyzer
Copy link
Collaborator

A job failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
Version: 4.2.2
Digest: sha256:ccb2698953eaebd21c7bf6268a94f9c26518a7e38e27e0b83c1fe1ad049819b1
Source commit SHA: 11bd71901bbe5b1630ceea73d27597364c9af683
##[endgroup]
Complete job name: DockerHub mirror
##[group]Run actions/checkout@v4
with:
  persist-credentials: false
  repository: rust-lang/rust
  token: ***
---
http.https://github.com/.extraheader
[command]/usr/bin/git config --local --unset-all http.https://github.com/.extraheader
[command]/usr/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'http\.https\:\/\/github\.com\/\.extraheader' && git config --local --unset-all 'http.https://github.com/.extraheader' || :"
##[endgroup]
##[group]Run echo "***" | docker login ghcr.io -u rust-lang --password-stdin
echo "***" | docker login ghcr.io -u rust-lang --password-stdin
shell: /usr/bin/bash -e {0}
##[endgroup]
Error response from daemon: login attempt to https://ghcr.io/v2/ failed with status: 502 Bad Gateway
##[error]Process completed with exit code 1.
Post job cleanup.

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-testsuite Area: The testsuite used to check the correctness of rustc merged-by-bors This PR was explicitly merged by bors. perf-regression Performance regression. 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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants