Skip to content

Conversation

matthiaskrgr
Copy link
Member

@matthiaskrgr matthiaskrgr commented May 30, 2025

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

compiler-errors and others added 11 commits May 29, 2025 11:16
Instead of manually navigating directories based on stage0 rustc, use `--print sysroot`
to get the sysroot directly. This also works when using the bootstrap `rustc` shim.

Signed-off-by: onur-ozkan <[email protected]>
It looks like this was added 6 years ago because of issues with the
MacOS linker. MacOS got a new linker in the meantime, so that should
probably be resolved now. Hopefully.
Structurally normalize types as needed in `projection_ty_core`

Introduce a `structurally_normalize` callback to `projection_ty_core`, and then use it before we match on the ty kind in `projection_ty_core`.

Previously we were only structurally normalizing the return type of the `handle_field` struct, but if we were to (e.g.) apply a deref projection to that type, then the resulting type is not guaranteed to be structurally normalized and any subsequent projections applied would ICE.

Fixes rust-lang/trait-system-refactor-initiative#221

I'll leave a few comments inline to explain the changes.

r? lcnr

---

Also fixes rust-lang#141708
Add tls_model for cygwin and enable has_thread_local

I've also tried to set `has_thread_local` to `true` and found it works actually. Why do we still implement our own `thread_local` instead of delegating all of them to LLVM?

cc: `@jeremyd2019`
…rom-rustc, r=Kobzol

resolve stage0 sysroot from rustc

Similar to rust-lang#141729, instead of manually navigating directories based on stage0 rustc, use `--print sysroot` to get the sysroot directly. This also works when using the bootstrap `rustc` shim.

r? Kobzol
…llaumeGomez

Rework `#[doc(cfg(..))]` checks as distinct pass in rustdoc

This PR reworks how rustdoc calls `rustc_attr_parsing::cfg_matches` to be in a separate pass, instead of being wired-up in a ad-hoc way, which is causing problems in rust-lang#138907 (comment).

This un-does most part of rust-lang#140894, but the result is IMO much cleaner, easier to reason about, and most importantly no longer interfears with rust-lang#138907.

r? `@GuillaumeGomez`
…TRY_LINKER_ON_SEGFAULT, r=petrochenkov

Remove RUSTC_RETRY_LINKER_ON_SEGFAULT hack

It looks like this was added in rust-lang#40422 6 years ago because of issues with the MacOS linker. MacOS got a new linker in the meantime, so that should probably be resolved now. Hopefully.

r? petrochenkov
@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-infra Relevant to the infrastructure 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 May 30, 2025
@matthiaskrgr
Copy link
Member Author

@bors r+ rollup=never p=5

@bors
Copy link
Collaborator

bors commented May 30, 2025

📌 Commit 4fce906 has been approved by matthiaskrgr

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 May 30, 2025
@bors
Copy link
Collaborator

bors commented May 30, 2025

⌛ Testing commit 4fce906 with merge aa5832b...

@bors
Copy link
Collaborator

bors commented May 30, 2025

☀️ Test successful - checks-actions
Approved by: matthiaskrgr
Pushing aa5832b to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label May 30, 2025
@bors bors merged commit aa5832b into rust-lang:master May 30, 2025
10 checks passed
@rustbot rustbot added this to the 1.89.0 milestone May 30, 2025
@rust-timer
Copy link
Collaborator

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#141703 Structurally normalize types as needed in `projection_ty_co… a4eda4b171f642b0cc0a9d6f780f752db0245517 (link)
#141719 Add tls_model for cygwin and enable has_thread_local 5720f6b3a35d7ea073f2278ca618dfca3edfd7d7 (link)
#141736 resolve stage0 sysroot from rustc 7a9a693aa368218de1cf806c0a6239fab027f5c6 (link)
#141746 Rework #[doc(cfg(..))] checks as distinct pass in rustdoc 565dce440d351fd8ab190d61fade58bad94329e8 (link)
#141749 Remove RUSTC_RETRY_LINKER_ON_SEGFAULT hack 08d36a467c596cc27d7bf29dceeae7f7be80cc36 (link)

previous master: e6152cdf5b

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

Copy link
Contributor

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 e6152cd (parent) -> aa5832b (this PR)

Test differences

Show 33330 test diffs

Stage 1

  • num::flt2dec::strategy::grisu::test_cached_power: [missing] -> ignore (J0)
  • sort::tests::stable::correct_i32_random_d1024: [missing] -> ignore (J0)
  • sort::tests::unstable::violate_ord_retain_orig_set_i32_random_s95: [missing] -> ignore (J0)
  • array::array_into_iter_rfold: [missing] -> pass (J1)
  • atomic::uint_and: [missing] -> pass (J1)
  • char::eu_iterator_specializations: [missing] -> pass (J1)
  • collections::btree::map::tests::test_extract_if::empty: [missing] -> pass (J1)
  • collections::btree::map::tests::test_range_small: [missing] -> pass (J1)
  • collections::hash::map::tests::test_lots_of_insertions: [missing] -> pass (J1)
  • collections::vec_deque::tests::make_contiguous_small_free: [missing] -> pass (J1)
  • floats::f16::test_is_sign_positive: [missing] -> pass (J1)
  • intrinsics::test_const_allocate_at_runtime: [missing] -> pass (J1)
  • mem::const_offset_of: [missing] -> pass (J1)
  • mem::test_transmute_copy: [missing] -> pass (J1)
  • mpmc::destroy_upgraded_shared_port_when_sender_still_active: [missing] -> pass (J1)
  • mpsc_sync::oneshot_single_thread_try_recv_closed: [missing] -> pass (J1)
  • num::bignum::test_mul_small_overflow: [missing] -> pass (J1)
  • num::i128::test_unbounded_shr: [missing] -> pass (J1)
  • num::i8::test_isolate_most_significant_one: [missing] -> pass (J1)
  • num::test_try_i32u16: [missing] -> pass (J1)
  • num::test_try_u128usize: [missing] -> pass (J1)
  • num::test_try_u64u16: [missing] -> pass (J1)
  • num::u128::test_div_ceil: [missing] -> pass (J1)
  • num::u64::test_carrying_mul_add: [missing] -> pass (J1)
  • pattern::test_simple_search: [missing] -> pass (J1)
  • slice::swap_panics::index_b_greater_than_len: [missing] -> pass (J1)
  • slice::test_insert_oob: [missing] -> pass (J1)
  • slice::test_split_iterator_mut_inclusive_reverse: [missing] -> pass (J1)
  • str::pattern::char_searcher_short_haystack::bwd: [missing] -> pass (J1)
  • str::slice_index::boundary::range_2::pass: [missing] -> pass (J1)
  • string::test_pop: [missing] -> pass (J1)
  • string::test_push_str: [missing] -> pass (J1)
  • sync::mpmc::tests::waker_current_thread_id: [missing] -> pass (J1)
  • sync::test_live: [missing] -> pass (J1)
  • sys_common::wtf8::tests::wtf8buf_truncate: [missing] -> pass (J1)
  • test_extension_path_sep: [missing] -> pass (J1)
  • thin_box::want_niche_optimization: [missing] -> pass (J1)
  • vec_deque::test_hash: [missing] -> pass (J1)
  • coverage::tests::test_covgraph_switchint_then_loop_else_return: [missing] -> pass (J2)
  • errors::verify_ast_passes_nested_impl_trait_34: [missing] -> pass (J2)
  • errors::verify_builtin_macros_test_case_non_item_60: [missing] -> pass (J2)
  • errors::verify_codegen_ssa_ignoring_output_36: [missing] -> pass (J2)
  • errors::verify_expand_proc_macro_back_compat_44: [missing] -> pass (J2)
  • errors::verify_parse_modifier_lifetime_145: [missing] -> pass (J2)
  • errors::verify_passes_doc_alias_bad_char_22: [missing] -> pass (J2)
  • graph::scc::tests::test_bug_max_leak: [missing] -> pass (J2)
  • markdown::term::tests::test_wrapping_write: [missing] -> pass (J2)
  • maybe_transmutable::tests::benches::bench_dfa_from_tree: [missing] -> pass (J2)
  • parser::tests::long_snippet_multiple_spans: [missing] -> pass (J2)
  • spec::tests::aarch64_linux_android: [missing] -> pass (J2)
  • spec::tests::powerpc64_wrs_vxworks: [missing] -> pass (J2)
  • transitive_relation::tests::pdub_crisscross_more: [missing] -> pass (J2)
  • ascii::medium::case05_branchless: [missing] -> pass (J3)
  • hash::sip::bench_bytes_4: [missing] -> pass (J3)
  • iter::bench_next_chunk_filter_mostly_false: [missing] -> pass (J3)
  • num::bench_u64_from_str_radix_16: [missing] -> pass (J3)
  • num::flt2dec::strategy::dragon::bench_big_shortest: [missing] -> pass (J3)
  • sort::tests::stable::self_cmp_string_ascending: [missing] -> pass (J3)
  • str::char_count::en_large::case03_manual_char_len: [missing] -> pass (J3)
  • str::char_count::en_small::case03_manual_char_len: [missing] -> pass (J3)
  • string::bench_insert_char_short: [missing] -> pass (J3)
  • sys::pal::common::tests::bench_heap_path_alloc: [missing] -> pass (J3)
  • vec::bench_dedup_random_100: [missing] -> pass (J3)
  • vec::bench_from_slice_0100: [missing] -> pass (J3)
  • vec::bench_in_place_u128_0010_i0: [missing] -> pass (J3)

Stage 2

  • sort::tests::unstable::observable_is_less_descending: ignore -> [missing] (J0)
  • sort::tests::unstable::violate_ord_retain_orig_set_string_random_d2: ignore -> [missing] (J0)
  • borrow::test_from_cow_path: pass -> [missing] (J1)
  • char::test_encode_utf8: pass -> [missing] (J1)
  • collections::btree::map::tests::test_cursor_mut_insert_before_3: pass -> [missing] (J1)
  • collections::btree::map::tests::test_retain: pass -> [missing] (J1)
  • collections::btree::set::tests::test_remove: pass -> [missing] (J1)
  • floats::f128::test_zero: pass -> [missing] (J1)
  • io::error::tests::test_simple_message_packing: pass -> [missing] (J1)
  • io::tests::try_oom_error: pass -> [missing] (J1)
  • iter::range::test_range_inclusive_last_max: pass -> [missing] (J1)
  • lazy::partialeq_impl: pass -> [missing] (J1)
  • net::parser::parse_socket_v4: pass -> [missing] (J1)
  • rwlock::test_rwlock_try_write: pass -> [missing] (J1)
  • slice::test_chunks_exact_nth: pass -> [missing] (J1)
  • str::slice_index::boundary::range_2::index_fail: pass -> [missing] (J1)
  • str::slice_index::range_neg_width::index_mut_fail: pass -> [missing] (J1)
  • string::test_replace_range: pass -> [missing] (J1)
  • vec::test_extend_from_within: pass -> [missing] (J1)
  • doctest::tests::make_test_returns_result: pass -> [missing] (J2)
  • errors::verify_builtin_macros_format_duplicate_arg_56: pass -> [missing] (J2)
  • errors::verify_codegen_ssa_unable_to_write_debugger_visualizer_66: pass -> [missing] (J2)
  • errors::verify_hir_typeck_trivial_cast_18: pass -> [missing] (J2)
  • errors::verify_mir_build_const_pattern_depends_on_generic_parameter_3: pass -> [missing] (J2)
  • errors::verify_parse_invalid_literal_suffix_on_tuple_index_41: pass -> [missing] (J2)
  • errors::verify_passes_doc_masked_not_extern_crate_self_38: pass -> [missing] (J2)
  • spec::tests::aarch64_unknown_none: pass -> [missing] (J2)
  • spec::tests::mips_unknown_linux_uclibc: pass -> [missing] (J2)
  • tests::test_fn_like_macro_noop: pass -> [missing] (J2)
  • net::addr_parser::bench_parse_socketaddr_v4: pass -> [missing] (J3)
  • sort::tests::unstable::correct_cell_i32_random_s95: pass -> [missing] (J3)
  • sort::tests::unstable::deterministic_i32_random: pass -> [missing] (J3)
  • str::ends_with_str::short_pile_of_poo: pass -> [missing] (J3)
  • str::split_space_char::long_lorem_ipsum: pass -> [missing] (J3)
  • str::split_terminator_space_char::short_ascii: pass -> [missing] (J3)

(and 16612 additional test diffs)

Additionally, 16618 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 aa5832b142a2bfd322659d60f5d57e25d2a1bd5d --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: 2000.6s -> 6857.2s (242.8%)
  2. test-various: 2429.4s -> 4229.8s (74.1%)
  3. x86_64-gnu-aux: 3933.8s -> 5701.2s (44.9%)
  4. x86_64-apple-1: 5277.2s -> 7306.0s (38.4%)
  5. aarch64-apple: 6484.2s -> 5034.3s (-22.4%)
  6. dist-x86_64-apple: 9289.9s -> 7809.5s (-15.9%)
  7. dist-aarch64-apple: 6492.6s -> 5475.7s (-15.7%)
  8. dist-aarch64-linux: 6411.0s -> 5493.3s (-14.3%)
  9. x86_64-gnu-nopt: 7055.8s -> 6325.0s (-10.4%)
  10. mingw-check: 1350.6s -> 1261.9s (-6.6%)
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

Finished benchmarking commit (aa5832b): 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%] 6
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-0.4% [-0.4%, -0.4%] 1
All ❌✅ (primary) 0.3% [0.3%, 0.3%] 6

Max RSS (memory usage)

Results (primary -0.1%, 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)
1.5% [1.5%, 1.5%] 1
Regressions ❌
(secondary)
0.4% [0.4%, 0.4%] 1
Improvements ✅
(primary)
-1.7% [-1.7%, -1.7%] 1
Improvements ✅
(secondary)
-0.9% [-1.8%, -0.5%] 6
All ❌✅ (primary) -0.1% [-1.7%, 1.5%] 2

Cycles

Results (secondary 0.2%)

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)
1.2% [0.6%, 2.8%] 7
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-0.7% [-1.1%, -0.5%] 8
All ❌✅ (primary) - - 0

Binary size

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

Bootstrap: missing data
Artifact size: 370.19 MiB -> 370.15 MiB (-0.01%)

@rustbot rustbot added the perf-regression Performance regression. label May 31, 2025
@Mark-Simulacrum
Copy link
Member

No clear cause (inlining changes?) from one cachegrind run. I don't think there's further investigation warranted.

< 78,881,679  ???:
  14,579,250    <rustc_trait_selection::traits::select::SelectionContext>::assemble_candidates
   7,987,226    <rustc_middle::ty::fold::BoundVarReplacer<rustc_middle::ty::fold::FnMutDelegate> as rustc_type_ir::fold::TypeFolder<rustc_middle::ty::context::TyCtxt>>::fold_clauses
   6,716,120    <rustc_borrowck::type_check::TypeChecker>::fully_perform_op::<rustc_middle::ty::Ty, rustc_middle::ty::ParamEnvAnd<rustc_middle::traits::query::type_op::Normalize<rustc_middle::ty::Ty>>>
   6,266,738    <rustc_middle::ty::fold::BoundVarReplacer<rustc_middle::ty::fold::FnMutDelegate> as rustc_type_ir::fold::TypeFolder<rustc_middle::ty::context::TyCtxt>>::fold_ty
   2,829,680    <rustc_type_ir::fast_reject::DeepRejectCtxt<rustc_middle::ty::context::TyCtxt, false, false>>::types_may_unify_inner
   2,601,557    <rustc_trait_selection::traits::select::SelectionContext>::confirm_candidate
   2,504,595    <rustc_infer::infer::canonical::canonicalizer::Canonicalizer as rustc_type_ir::fold::TypeFolder<rustc_middle::ty::context::TyCtxt>>::fold_ty

@Mark-Simulacrum Mark-Simulacrum added the perf-regression-triaged The performance regression has been triaged. label Jun 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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. perf-regression-triaged The performance regression has been triaged. 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-infra Relevant to the infrastructure 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.

10 participants