Skip to content
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

Rollup of 7 pull requests #139023

Merged
merged 22 commits into from
Mar 27, 2025
Merged

Rollup of 7 pull requests #139023

merged 22 commits into from
Mar 27, 2025

Conversation

jhpratt
Copy link
Member

@jhpratt jhpratt commented Mar 27, 2025

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

nnethercote and others added 22 commits March 26, 2025 12:03
There are several places in `rustc_middle` that check for an empty
lifetime name. These checks appear to be totally unnecessary, because
empty lifetime names aren't produced here. (Empty lifetime names *are*
possible in `hir::Lifetime`. Perhaps there was some confusion between
it and the `rustc_middle` types?)

This commit removes the `kw::Empty` checks.
There is no difference between the Patternand Borrow cases. Reduce it to
a simple struct.
This is very non-obvious if it fails in PR CI.
Much like the ones in the previous commit.
Signed-off-by: xizheyin <xizheyin@smail.nju.edu.cn>
Signed-off-by: xizheyin <xizheyin@smail.nju.edu.cn>
This will allow us to provide links to CI workflows, jobs and summaries in the post-merge analysis report.
expand: Leave traces when expanding `cfg` attributes

This is the same as rust-lang#138515, but for `cfg(true)` instead of `cfg_attr`.

The difference is that `cfg(true)`s already left "traces" after themselves - the `cfg` attributes themselves, with `expanded_inert_attrs` set to true, with full tokens, available to proc macros.
This is not a reasonably expected behavior, but it could not be removed without a replacement, because a [major rustdoc feature](rust-lang/rfcs#3631) and a number of clippy lints rely on it. This PR implements a replacement.

This needs a crater run, because it changes observable behavior (in an intended way) - proc macros can no longer see expanded `cfg(true)` attributes.

(Some minor unnecessary special casing for `sym::cfg_attr` is also removed in this PR.)

r? `@nnethercote`
…ddle, r=lcnr

Remove `kw::Empty` uses from `rustc_middle`.

There are several places in `rustc_middle` that check for an empty lifetime name. These checks appear to be totally unnecessary, because empty lifetime names aren't produced here. (Empty lifetime names *are* possible in `hir::Lifetime`. Perhaps there was some confusion between it and the `rustc_middle` types?)

This commit removes the `kw::Empty` checks.

r? `@lcnr`
…lmann,dingxiangfei2009

Clean up a few things in rustc_hir_analysis::check::region

Each commit is independent. They are all small clean-ups in rustc_hir_analysis::check::region.
…leywiser

Report compiletest pass mode if forced

This is very non-obvious if it fails in PR CI, because the starting invocation is miles away from the final test suite outcome.
Improve suggest construct with literal syntax instead of calling

Closing rust-lang#138931

When constructing a structure through a format similar to calling a constructor, we can use verbose suggestions to hint at using literal syntax for clearer advice. The case of multiple fields is also considered here, provided that the field has the same number of arguments as CallExpr.

r? compiler
…ozkan

Remove unneeded LLVM CI test assertions

The `download_ci_llvm` bootstrap test was checking implementation details of the LLVM CI download check, which isn't very useful. It was essentially testing "if function_that_checks_if_llvm_ci_is_available returns true, we enable CI LLVM", but the usage of the function was an implementation detail. After rust-lang#138704, the inner implementation has changed, so the test now breaks if LLVM is updated.

I don't think that it's very useful to test implementation details like this, without taking the outside git state into account. Ideally, we should mock the git state for the test, otherwise the test will randomly break when executed in environments which the test does not control (e.g. on CI when a LLVM change happens).

I only kept the part of the test that checks that LLVM CI isn't used when we specify `download-ci-llvm = false`, as that should hold under all conditions, CI/local, and all git states.

I also kept the `if-unchanged` assertion, but only on CI, and as a temporary measure. After rust-lang#138591, we should have a proper way of mocking the git state to make the test robust, and make it test what we actually want.

Fixes [this](rust-lang#138784 (comment)).

r? `@ghost`
…ns, r=marcoieni

Add job duration changes to post-merge analysis report

This should help us observe large regressions in job duration changes.

I would also like to add quick links to GH jobs/workflow to the post-merge workflow, but for that I first need to store some CI metadata to the bootstrap metrics, to make it easier to lookup the corresponding GH workflows (otherwise we'd need to look them up by commit SHA, which would be much more complicated). The last commit adds this metadata. Once this PR is merged, and the metadata will be available in the metrics stored on S3, I'll send a follow-up PR that uses the metadata to add links to job names in the post-merge workflow report.

r? `@marcoieni`
@rustbot rustbot added A-attributes Area: Attributes (`#[…]`, `#![…]`) A-compiletest Area: The compiletest test runner A-query-system Area: The rustc query system (https://rustc-dev-guide.rust-lang.org/query.html) 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. labels Mar 27, 2025
@rustbot rustbot added T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. rollup A PR which is a rollup labels Mar 27, 2025
@jhpratt
Copy link
Member Author

jhpratt commented Mar 27, 2025

@bors r+ rollup=never p=5

@bors
Copy link
Collaborator

bors commented Mar 27, 2025

📌 Commit 1b8089d 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 Mar 27, 2025
@bors
Copy link
Collaborator

bors commented Mar 27, 2025

⌛ Testing commit 1b8089d with merge 3f55023...

@bors
Copy link
Collaborator

bors commented Mar 27, 2025

☀️ Test successful - checks-actions
Approved by: jhpratt
Pushing 3f55023 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Mar 27, 2025
@bors bors merged commit 3f55023 into rust-lang:master Mar 27, 2025
7 checks passed
@rustbot rustbot added this to the 1.87.0 milestone Mar 27, 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 217693a (parent) -> 3f55023 (this PR)

Test differences

Show 32937 test diffs

Stage 1

  • autotraits::test_btree_set: [missing] -> pass (J0)
  • collections::btree::map::tests::test_extract_if::height_2_removing_one: [missing] -> pass (J0)
  • errors_that_start_with_newline_formats_correctly: [missing] -> pass (J0)
  • f16::test_next_down: [missing] -> pass (J0)
  • io::buffered::tests::line_buffer_write0_error: [missing] -> pass (J0)
  • iter::range::test_range_nth: [missing] -> pass (J0)
  • lazy_lock::sync_lazy_poisoning: [missing] -> pass (J0)
  • mpmc::oneshot_single_thread_try_recv_closed: [missing] -> pass (J0)
  • num::bignum::test_div_rem: [missing] -> pass (J0)
  • num::i16::test_carrying_mul_add: [missing] -> pass (J0)
  • num::i64::test_be: [missing] -> pass (J0)
  • num::u64::test_borrowing_sub: [missing] -> pass (J0)
  • num::u64::test_from_str: [missing] -> pass (J0)
  • rc::test_copy_from_slice: [missing] -> pass (J0)
  • slice::test_first: [missing] -> pass (J0)
  • str::strslice_issue_104726: [missing] -> pass (J0)
  • string::remove_bad: [missing] -> pass (J0)
  • sys_common::wtf8::tests::wtf8buf_truncate: [missing] -> pass (J0)
  • thin_box::align2zst: [missing] -> pass (J0)
  • vec::test_cow_from: [missing] -> pass (J0)
  • vec::test_dedup_by: [missing] -> pass (J0)
  • vec::test_splice: [missing] -> pass (J0)
  • vec::test_splice_items_zero_sized: [missing] -> pass (J0)
  • array::map_256byte_8byte_256: [missing] -> pass (J1)
  • fmt::write_u128_min: [missing] -> pass (J1)
  • hash::sip::bench_bytes_4: [missing] -> pass (J1)
  • num::int_log::u64_log_random: [missing] -> pass (J1)
  • sort::tests::stable::violate_ord_retain_orig_set_string_descending: [missing] -> pass (J1)
  • sort::tests::unstable::correct_string_random_s95: [missing] -> pass (J1)
  • sort::tests::unstable::violate_ord_retain_orig_set_string_random_d2: [missing] -> pass (J1)
  • str::char_count::ru_tiny::case00_libcore: [missing] -> pass (J1)
  • str::char_count::ru_tiny::case01_filter_count_cont_bytes: [missing] -> pass (J1)
  • str::contains_bang_str::long_lorem_ipsum: [missing] -> pass (J1)
  • str::contains_bang_str::short_mixed: [missing] -> pass (J1)
  • time::instant_contention_04_threads: [missing] -> pass (J1)
  • errors::verify_builtin_macros_default_arg_50: [missing] -> pass (J2)
  • errors::verify_hir_typeck_return_stmt_outside_of_fn_body_1: [missing] -> pass (J2)
  • errors::verify_interface_multiple_output_types_to_stdout_18: [missing] -> pass (J2)
  • errors::verify_mir_build_const_pattern_depends_on_generic_parameter_3: [missing] -> pass (J2)
  • errors::verify_session_invalid_character_in_crate_name_28: [missing] -> pass (J2)
  • errors::verify_session_sanitizers_not_supported_7: [missing] -> pass (J2)
  • session_diagnostics::verify_attr_parsing_rustc_promotable_pairing_17: [missing] -> pass (J2)
  • session_diagnostics::verify_attr_parsing_stability_outside_std_29: [missing] -> pass (J2)
  • f16::test_trunc: [missing] -> pass (J3)
  • sort::tests::stable::deterministic_cell_i32_random_d2: [missing] -> ignore (J4)
  • sort::tests::stable::panic_retain_orig_set_i32_saw_mixed: [missing] -> ignore (J4)
  • sort::tests::stable::self_cmp_i32_random_s95: [missing] -> ignore (J4)
  • sort::tests::unstable::observable_is_less_descending: [missing] -> ignore (J4)

Stage 2

  • atomic::uint_and: pass -> [missing] (J0)
  • clone::test_clone_to_uninit_slice_success: pass -> [missing] (J0)
  • collections::btree::map::tests::test_range_backwards_2: pass -> [missing] (J0)
  • collections::btree::set::tests::test_extend_ref: pass -> [missing] (J0)
  • collections::vec_deque::tests::issue_108453: pass -> [missing] (J0)
  • f128::test_num_f128: pass -> [missing] (J0)
  • io::cursor::tests::test_box_slice_writer: pass -> [missing] (J0)
  • io::error::tests::test_debug_error: pass -> [missing] (J0)
  • io::error::tests::test_errorkind_packing: pass -> [missing] (J0)
  • io::util::tests::empty_reads: pass -> [missing] (J0)
  • iter::adapters::zip::test_zip_cloned_sideffectful: pass -> [missing] (J0)
  • join_paths_unix: pass -> [missing] (J0)
  • mpmc::oneshot_multi_thread_close_stress: pass -> [missing] (J0)
  • mpsc_sync::test_nested_recv_iter: pass -> [missing] (J0)
  • mutex::test_mutex_arc_poison: pass -> [missing] (J0)
  • num::float_iter_sum_identity::f64_own: pass -> [missing] (J0)
  • num::i8::test_count_zeros: pass -> [missing] (J0)
  • num::u32::test_borrowing_sub: pass -> [missing] (J0)
  • num::u32::test_carrying_mul: pass -> [missing] (J0)
  • num::u64::test_isolate_least_significant_one: pass -> [missing] (J0)
  • num::u8::test_count_ones: pass -> [missing] (J0)
  • rc::test_show: pass -> [missing] (J0)
  • reentrant_lock::smoke: pass -> [missing] (J0)
  • slice::slice_index::rangeinclusive_overflow::index_mut_fail: pass -> [missing] (J0)
  • slice::test_binary_search_implementation_details: pass -> [missing] (J0)
  • slice::test_get_mut: pass -> [missing] (J0)
  • str::from_utf8_error: pass -> [missing] (J0)
  • thread::tests::sleep_ms_smoke: pass -> [missing] (J0)
  • vec::max_remove: pass -> [missing] (J0)
  • vec::test_drain_keep_rest_all: pass -> [missing] (J0)
  • ascii::short::case05_branchless: pass -> [missing] (J1)
  • fs::tests::copy_file_preserves_perm_bits: pass -> [missing] (J1)
  • net::tcp::tests::clone_while_reading: pass -> [missing] (J1)
  • sort::tests::unstable::correct_1k_ascending: pass -> [missing] (J1)
  • sort::tests::unstable::correct_string_ascending: pass -> [missing] (J1)
  • sort::tests::unstable::correct_string_random_d20: pass -> [missing] (J1)
  • sort::tests::unstable::stability_string_saw_mixed: pass -> [missing] (J1)
  • str::find_zzz_str::short_mixed: pass -> [missing] (J1)
  • vec::bench_extend_0010_0010: pass -> [missing] (J1)
  • vec::bench_extend_1000_1000: pass -> [missing] (J1)
  • vec::bench_extend_from_slice_0000_0010: pass -> [missing] (J1)
  • errors::verify_builtin_macros_trace_macros_24: pass -> [missing] (J2)
  • errors::verify_metadata_stable_crate_id_collision_62: pass -> [missing] (J2)
  • errors::verify_mir_build_irrefutable_let_patterns_let_else_13: pass -> [missing] (J2)
  • errors::verify_mir_build_irrefutable_let_patterns_while_let_14: pass -> [missing] (J2)
  • errors::verify_parse_missing_for_in_trait_impl_69: pass -> [missing] (J2)
  • interval::tests::contains: pass -> [missing] (J2)
  • spec::tests::aarch64_apple_ios_sim: pass -> [missing] (J2)
  • spec::tests::i686_unknown_haiku: pass -> [missing] (J2)
  • spec::tests::loongarch64_unknown_linux_gnu: pass -> [missing] (J2)
  • sort::tests::stable::correct_i32_random_d1024: ignore -> [missing] (J4)
  • os::net::linux_ext::tests::quickack: pass -> [missing] (J5)

(and 16366 additional test diffs)

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

Job group index

  • J0: aarch64-apple, test-various, x86_64-apple-1, x86_64-gnu-aux
  • J1: aarch64-apple, test-various, x86_64-apple-1
  • J2: aarch64-apple, x86_64-apple-1
  • J3: aarch64-apple
  • J4: x86_64-gnu-aux
  • J5: test-various

Job duration changes

  1. x86_64-apple-2: 1616.4s -> 5649.4s (249.5%)
  2. test-various: 2428.8s -> 4204.1s (73.1%)
  3. x86_64-gnu-aux: 4551.4s -> 6167.4s (35.5%)
  4. aarch64-apple: 3548.0s -> 4098.4s (15.5%)
  5. x86_64-msvc-2: 6612.5s -> 7378.6s (11.6%)
  6. dist-x86_64-musl: 7374.5s -> 7891.9s (7.0%)
  7. dist-x86_64-apple: 7855.1s -> 8300.6s (5.7%)
  8. dist-x86_64-freebsd: 4866.9s -> 5140.2s (5.6%)
  9. x86_64-apple-1: 6830.2s -> 7175.5s (5.1%)
  10. x86_64-gnu-nopt: 5438.5s -> 5711.4s (5.0%)
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
#138844 expand: Leave traces when expanding cfg attributes 8d60e92dab8cbe952303977ec082c925db176100 (link)
#138926 Remove kw::Empty uses from rustc_middle. fb01875123f4dd38b66e52a17c125e020eee49c5 (link)
#138989 Clean up a few things in rustc_hir_analysis::check::region 94077a1cf49b4bdd1fdfa59666a881aeff8f5c8f (link)
#138999 Report compiletest pass mode if forced 940efabe57cb178411845d2bb76d5a7756a2121e (link)
#139014 Improve suggest construct with literal syntax instead of ca… 99ed0dfff82e68ae171cad79db5f641f408bd088 (link)
#139015 Remove unneeded LLVM CI test assertions 26373f03df554d3869606370949f2bf99649172f (link)
#139016 Add job duration changes to post-merge analysis report 879e56c7ae3ea7c05612ad77c252e7fea89a21a2 (link)

previous master: 217693a1f0

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

Overall result: ✅ improvements - no action needed

@rustbot label: -perf-regression

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
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-0.4% [-0.5%, -0.2%] 21
Improvements ✅
(secondary)
-0.2% [-0.2%, -0.2%] 1
All ❌✅ (primary) -0.4% [-0.5%, -0.2%] 21

Max RSS (memory usage)

Results (primary -1.2%, secondary 2.3%)

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)
2.3% [2.3%, 2.3%] 1
Improvements ✅
(primary)
-1.2% [-2.0%, -0.6%] 4
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -1.2% [-2.0%, -0.6%] 4

Cycles

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

Binary size

Results (primary -0.4%)

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.4% [-2.3%, -0.0%] 73
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -0.4% [-2.3%, -0.0%] 73

Bootstrap: 778.49s -> 777.846s (-0.08%)
Artifact size: 365.89 MiB -> 365.94 MiB (0.01%)

@jhpratt jhpratt deleted the rollup-4ou6ei4 branch March 27, 2025 23:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-attributes Area: Attributes (`#[…]`, `#![…]`) A-compiletest Area: The compiletest test runner A-query-system Area: The rustc query system (https://rustc-dev-guide.rust-lang.org/query.html) 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-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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants