Skip to content

Rollup of 11 pull requests #140682

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 25 commits into from
May 6, 2025
Merged

Conversation

GuillaumeGomez
Copy link
Member

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

dianqk and others added 25 commits April 20, 2025 20:56
This can provide more opportunities for MatchBranchSimplification.
Signed-off-by: onur-ozkan <[email protected]>
This commit does the following:
  - Replaces use of rustc_type_ir by rustc_middle in rustc_infer.
  - The DelayedMap type is exposed by rustc_middle so everything can be
    accessed through rustc_middle in a coherent manner.
  - API-layer traits, like InferCtxtLike, Interner or inherent::* must be
    accessed via rustc_type_ir, not rustc_middle::ty. For this reason
    these are not reexported by rustc_middle::ty.
  - Replaces use of ty::Interner by rustc_type_ir::Interner in
    rustc_trait_selection
Trying to understand panics triggered by `t` macro calls is very exhausting (especially on CI failures)
because it doesn't provide any information about where the macro was originally invoked. This change adds
that missing information when an inner call inside the `t` macro panics.

Signed-off-by: onur-ozkan <[email protected]>
Signed-off-by: onur-ozkan <[email protected]>
mir-opt: Use one MirPatch in MatchBranchSimplification
mir-opt: execute MatchBranchSimplification after GVN

This can provide more opportunities for MatchBranchSimplification.

Currently, rustc does not optimize the following code into a single statement at mir-opt, and this PR fixes the first case.

```rust
pub fn match1(c: bool, v1: i32, v2: i32) -> i32 {
    if c { v1 - v2 } else { v1 - v2 }
}

pub fn match2(c: bool, v1: i32) -> i32 {
    if c { v1 - 1 } else { v1 - 1 }
}
```

https://rust.godbolt.org/z/Y8xPMjrfM

r? mir-opt
bypass linker configuration and cross target check on `x check`

I was going to handle this using the untracked env approach, but I realized it somehow doesn't regress rust-lang#130108 anymore...

Anyway, if it works, it works. 😄 No need to dig deeper but my guess is we moved some cache-invalidating env from these functions to others.

Fixes rust-lang#133840

try-job: aarch64-apple
…lcnr

Resolve instance for SymFn in global/naked asm

`Instance::expect_resolve` ensures that we're actually going from trait item -> impl item.

Fixes rust-lang#140373
…compiler-errors

Removing rustc_type_ir in the rustc_infer codebase

cc rust-lang#138449

This is a second refactoring of rustc_type_ir to use rustc_middle instead, this time that's for rustc_infer
…mpiler-errors

`fn check_opaque_type_parameter_valid` defer error

Will be used in rust-lang#139587 to silence opaque type errors if there are other borrowck failures. I think it can be merged separately.

r? `@compiler-errors`
…ro, r=Kobzol

implement `PanicTracker` to track `t` panics

Trying to understand panics triggered by `t` macro is very exhausting (especially on CI failures) because it doesn't provide any information about where the macro was originally invoked. This change adds that missing information when an inner call inside the `t` macro panics.

Resolves rust-lang#137557
Make `-Zfixed-x18` into a target modifier

As part of rust-lang#136966, the `-Zfixed-x18` flag should be turned into a target modifier. This is a blocker to stabilization of the flag. The flag was originally added in rust-lang#124655 and the MCP for its addition is [MCP#748](rust-lang/compiler-team#748).

On some aarch64 targets, the x18 register is used as a temporary caller-saved register by default. When the `-Zfixed-x18` flag is passed, this is turned off so that the compiler doesn't use the x18 register. This allows end-users to use the x18 register for other purposes. For example, by accessing it with inline asm you can use the register as a very efficient thread-local variable. Another common use-case is to store the stack pointer needed by the shadow-call-stack sanitizer. There are also some aarch64 targets where not using x18 is the default – in those cases the flag is a no-op.

Note that this flag does not *on its own* cause an ABI mismatch. What actually causes an ABI mismatch is when you have different compilation units that *disagree* on what it should be used for. But having a CU that uses it and another CU that doesn't normally isn't enough to trigger an ABI problem. However, we still consider the flag to be a target modifier in all cases, since it is assumed that you are passing the flag because you intend to assign some other meaning to the register. Rejecting all flag mismatches even if not all are unsound is consistent with [RFC#3716](https://rust-lang.github.io/rfcs/3716-target-modifiers.html). See the headings "not all mismatches are unsound" and "cases that are not caught" for additional discussion of this.

On aarch64 targets where `-Zfixed-x18` is not a no-op, it is an error to pass `-Zsanitizer=shadow-call-stack` without also passing `-Zfixed-x18`.
calculate step duration in a panic-safe way

obvious/self-explanatory change.

Fixes rust-lang#129959
…r=lcnr

Deeply normalize in the new solver in WF

We need to deeply normalize types we check for well-formedness, since we only collect implied bounds from normalized signature types.

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

r? lcnr
Update books

## rust-lang/reference

9 commits in 3bf3402aea982b876eb56c87da17b0685c6461d5..387392674d74656f7cb437c05a96f0c52ea8e601
2025-05-03 21:29:09 UTC to 2025-04-22 15:25:03 UTC

- Document `let_chains` again (rust-lang/reference#1740)
- Add: orphan rule rationale. (rust-lang/reference#1755)
- Remove apologies about the Reference (rust-lang/reference#1792)
- Clean up some inline assembly examples (rust-lang/reference#1804)
- Remove StructExprTuple and StructExprUnit (rust-lang/reference#1803)
- Improve documentation of struct expressions (rust-lang/reference#1799)
- Clarify interaction of asm-goto with IBT (rust-lang/reference#1790)
- naked functions (rust-lang/reference#1689)
- Relabel grammarRailroad-Button (rust-lang/reference#1798)

## rust-lang/rust-by-example

3 commits in 0d7964d5b22cf920237ef1282d869564b4883b88..8a8918c698534547fa8a1a693cb3e7277f0bfb2f
2025-04-30 12:20:49 UTC to 2025-04-22 17:42:30 UTC

-   The example is not meant to be compiled. Changed the code block ann… (rust-lang/rust-by-example#1926)
- Non-tail recursive call note in testcase_linked_list.md (rust-lang/rust-by-example#1924)
- docs: mark illustrative 'static lifetime example with `ignore` (rust-lang/rust-by-example#1923)
@rustbot rustbot added 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. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver) rollup A PR which is a rollup labels May 5, 2025
@GuillaumeGomez
Copy link
Member Author

@bors r+ p=5 rollup=never

@bors
Copy link
Collaborator

bors commented May 5, 2025

📌 Commit 2a882f7 has been approved by GuillaumeGomez

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

bors commented May 5, 2025

⌛ Testing commit 2a882f7 with merge 4a0969e...

@bors
Copy link
Collaborator

bors commented May 6, 2025

☀️ Test successful - checks-actions
Approved by: GuillaumeGomez
Pushing 4a0969e to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label May 6, 2025
@bors bors merged commit 4a0969e into rust-lang:master May 6, 2025
1 check passed
@rustbot rustbot added this to the 1.88.0 milestone May 6, 2025
Copy link

github-actions bot commented May 6, 2025

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 2e6882a (parent) -> 4a0969e (this PR)

Test differences

Show 33134 test diffs

Stage 1

  • errors::verify_parse_invalid_attr_unsafe_163: [missing] -> pass (J0)
  • errors::verify_passes_inline_ignored_constants_9: [missing] -> pass (J0)
  • errors::verify_passes_unnecessary_stable_feature_169: [missing] -> pass (J0)
  • graph::dominators::tests::immediate_dominator: [missing] -> pass (J0)
  • graph::scc::tests::diamond: [missing] -> pass (J0)
  • graph::scc::tests::test_big_scc: [missing] -> pass (J0)
  • html::url_parts_builder::tests::push_fmt: [missing] -> pass (J0)
  • lints::verify_lint_type_ir_inherent_usage_61: [missing] -> pass (J0)
  • parser::tests::look_ahead_non_outermost_stream: [missing] -> pass (J0)
  • spec::base::apple::tests::simulator_targets_set_abi: [missing] -> pass (J0)
  • spec::tests::aarch64_unknown_freebsd: [missing] -> pass (J0)
  • spec::tests::riscv32imac_unknown_none_elf: [missing] -> pass (J0)
  • collections::binary_heap::test_push_unique: [missing] -> pass (J1)
  • collections::hash::set::tests::test_show: [missing] -> pass (J1)
  • collections::linked_list::tests::test_mut_rev_iter: [missing] -> pass (J1)
  • f32::test_is_sign_negative: [missing] -> pass (J1)
  • f64::test_atanh: [missing] -> pass (J1)
  • hash::test_writer_hasher: [missing] -> pass (J1)
  • io::buffered::tests::line_buffer_write0_error: [missing] -> pass (J1)
  • io::cursor::tests::test_mem_reader: [missing] -> pass (J1)
  • io::error::tests::test_size: [missing] -> pass (J1)
  • io::tests::read_buf_broken_read: [missing] -> pass (J1)
  • iter::adapters::peekable::test_iterator_peekable_fold: [missing] -> pass (J1)
  • mpsc::recv_timeout_upgrade: [missing] -> pass (J1)
  • nonzero::nonzero_const: [missing] -> pass (J1)
  • num::dec2flt::nan: [missing] -> pass (J1)
  • num::flt2dec::strategy::dragon::test_mul_pow10: [missing] -> pass (J1)
  • num::i32::test_checked_next_multiple_of: [missing] -> pass (J1)
  • num::i64::test_widening_mul: [missing] -> pass (J1)
  • num::i8::test_next_multiple_of: [missing] -> pass (J1)
  • num::int_sqrt::u64::isqrt: [missing] -> pass (J1)
  • num::test_boolu16: [missing] -> pass (J1)
  • num::test_try_u128u8: [missing] -> pass (J1)
  • num::u64::test_isqrt: [missing] -> pass (J1)
  • slice::test_reverse_part: [missing] -> pass (J1)
  • sort::tests::unstable::int_edge: [missing] -> pass (J1)
  • str::slice_index::boundary::range_1::index_mut_fail: [missing] -> pass (J1)
  • str::test_utf16_code_units: [missing] -> pass (J1)
  • test_compare: [missing] -> pass (J1)
  • thread::tests::test_unnamed_thread: [missing] -> pass (J1)
  • vec::test_move_items_reverse: [missing] -> pass (J1)
  • ascii::is_ascii::unaligned_head_medium::case00_libcore: [missing] -> pass (J2)
  • ascii::medium::case02_lookup_table: [missing] -> pass (J2)
  • iter::bench_flat_map_chain_sum: [missing] -> pass (J2)
  • num::int_sqrt::u64_sqrt_random: [missing] -> pass (J2)
  • num::int_sqrt::u8_sqrt_random_small: [missing] -> pass (J2)
  • vec_deque::bench_extend_chained_bytes: [missing] -> pass (J2)
  • sort::tests::unstable::violate_ord_retain_orig_set_i32_saw_mixed: [missing] -> ignore (J3)

Stage 2

  • edit_distance::tests::test_edit_distance_limit: pass -> [missing] (J0)
  • errors::verify_ast_passes_generic_default_trailing_45: pass -> [missing] (J0)
  • errors::verify_builtin_macros_asm_sym_no_path_73: pass -> [missing] (J0)
  • errors::verify_metadata_link_modifiers_form_11: pass -> [missing] (J0)
  • errors::verify_parse_invalid_literal_suffix_on_tuple_index_36: pass -> [missing] (J0)
  • errors::verify_parse_loop_else_23: pass -> [missing] (J0)
  • errors::verify_parse_non_string_abi_literal_37: pass -> [missing] (J0)
  • errors::verify_passes_doc_search_unbox_invalid_34: pass -> [missing] (J0)
  • parser::tests::multiple_labels_without_message: pass -> [missing] (J0)
  • session_diagnostics::verify_driver_impl_ice_bug_report_update_note_10: pass -> [missing] (J0)
  • spec::tests::armv4t_none_eabi: pass -> [missing] (J0)
  • spec::tests::armv7_linux_androideabi: pass -> [missing] (J0)
  • tests::test_some_labelled: pass -> [missing] (J0)
  • c_str2::from_bytes_with_nul_interior: pass -> [missing] (J1)
  • collections::binary_heap::panic_safe: pass -> [missing] (J1)
  • collections::btree::set::tests::test_extract_if_drop_panic_leak: pass -> [missing] (J1)
  • collections::btree::set::tests::test_first_last: pass -> [missing] (J1)
  • f128::test_clamp_max_is_nan: pass -> [missing] (J1)
  • f16::test_next_down: pass -> [missing] (J1)
  • f32::test_clamp_min_is_nan: pass -> [missing] (J1)
  • f64::test_mul_add: pass -> [missing] (J1)
  • ffi::os_str::tests::test_os_string_reserve_exact: pass -> [missing] (J1)
  • fmt::float::test_format_f64_rounds_ties_to_even: pass -> [missing] (J1)
  • iter::traits::iterator::test_count: pass -> [missing] (J1)
  • iter::traits::iterator::test_iterator_len: pass -> [missing] (J1)
  • macros::cfg_match_basic: pass -> [missing] (J1)
  • num::bignum::test_sub_underflow_2: pass -> [missing] (J1)
  • num::i128::test_saturating_abs: pass -> [missing] (J1)
  • num::int_sqrt::i128::isqrt: pass -> [missing] (J1)
  • num::test_try_i8usize: pass -> [missing] (J1)
  • num::test_u16_to_string: pass -> [missing] (J1)
  • slice::split_off_last_mut_nonempty: pass -> [missing] (J1)
  • slice::test_chunks_mut_last: pass -> [missing] (J1)
  • slice::test_iter_folds: pass -> [missing] (J1)
  • slice::test_total_ord_u8: pass -> [missing] (J1)
  • str::test_as_bytes: pass -> [missing] (J1)
  • sys_common::wtf8::tests::wtf8_slice_from: pass -> [missing] (J1)
  • test_with_extension: pass -> [missing] (J1)
  • vec_deque::test_retain: pass -> [missing] (J1)
  • ascii::is_ascii::medium::case00_libcore: pass -> [missing] (J2)
  • ascii::short::case10_mask_mult_bool_lookup_table: pass -> [missing] (J2)
  • btree::set::clone_100_and_remove_half: pass -> [missing] (J2)
  • hash::sip::bench_bytes_b_32: pass -> [missing] (J2)
  • hash::sip::bench_u32_keyed: pass -> [missing] (J2)
  • net::tcp::tests::listen_localhost: pass -> [missing] (J2)
  • num::flt2dec::strategy::dragon::bench_big_exact_3: pass -> [missing] (J2)
  • num::int_sqrt::u32_sqrt_random: pass -> [missing] (J2)
  • slice::binary_search_l2: pass -> [missing] (J2)
  • str::debug::ascii_escapes: pass -> [missing] (J2)
  • string::bench_insert_char_short: pass -> [missing] (J2)
  • vec::bench_rev_2: pass -> [missing] (J2)
  • sort::tests::stable::deterministic_string_descending: ignore -> [missing] (J3)

(and 16482 additional test diffs)

Additionally, 16552 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 4a0969e06dbeaaa43914d2d00b2e843d49aa3886 --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: 1343.2s -> 5720.8s (325.9%)
  2. test-various: 2277.4s -> 4156.3s (82.5%)
  3. x86_64-apple-1: 5516.2s -> 9360.6s (69.7%)
  4. x86_64-gnu-aux: 4253.3s -> 6186.9s (45.5%)
  5. aarch64-apple: 3266.3s -> 4240.0s (29.8%)
  6. dist-apple-various: 7676.3s -> 6615.2s (-13.8%)
  7. dist-arm-linux: 5704.0s -> 5144.9s (-9.8%)
  8. dist-x86_64-illumos: 5772.1s -> 6240.1s (8.1%)
  9. arm-android: 5294.2s -> 5610.1s (6.0%)
  10. dist-x86_64-netbsd: 5315.7s -> 5009.5s (-5.8%)
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
#140080 mir-opt: Use one MirPatch in MatchBranchSimplification 296ff4d7aae069df8016b44794e6bf0a6d01e6ee (link)
#140115 mir-opt: execute MatchBranchSimplification after GVN 66ac4735087467c88fb570e9d5a00fe7daee55c9 (link)
#140357 bypass linker configuration and cross target check on `x ch… 5cd3369be3e8dd9f16ccaf088db01a4889656214 (link)
#140374 Resolve instance for SymFn in global/naked asm 136777809f0a631876d4994e2dbf2a99a7578b27 (link)
#140559 Removing rustc_type_ir in the rustc_infer codebase bacfbd48a85235eead3085fdc25d41963159d1d9 (link)
#140605 fn check_opaque_type_parameter_valid defer error c733f4286f2431dbdf82edbe7a557348e3d0256c (link)
#140636 implement PanicTracker to track t panics 1d73191e28c30b68f9ff53d1dc47deb9697c4f92 (link)
#140661 Make -Zfixed-x18 into a target modifier e25a70b7901203ec40b4304053637c70a87b246c (link)
#140670 calculate step duration in a panic-safe way 92223220b4baedfb9daff9db73bc0bfed6fc84e3 (link)
#140672 Deeply normalize in the new solver in WF b5405d80803f36b700592ba63708cd4951a3da17 (link)
#140676 Update books 949eca89bc46a675bf6827f8c540f16824eb5e6a (link)

previous master: 2e6882ac5b

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 (4a0969e): 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.3% [-0.3%, -0.3%] 1
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -0.3% [-0.3%, -0.3%] 1

Max RSS (memory usage)

Results (primary -0.2%, secondary -2.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)
1.8% [0.5%, 4.9%] 10
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-2.0% [-6.4%, -0.4%] 11
Improvements ✅
(secondary)
-2.4% [-2.4%, -2.4%] 1
All ❌✅ (primary) -0.2% [-6.4%, 4.9%] 21

Cycles

Results (primary 1.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)
1.5% [0.4%, 6.8%] 19
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-0.5% [-0.5%, -0.4%] 3
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 1.3% [-0.5%, 6.8%] 22

Binary size

Results (primary 0.0%)

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.2% [0.2%, 0.4%] 5
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-0.3% [-0.9%, -0.0%] 4
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 0.0% [-0.9%, 0.4%] 9

Bootstrap: 770.068s -> 770.615s (0.07%)
Artifact size: 365.41 MiB -> 365.41 MiB (0.00%)

@GuillaumeGomez GuillaumeGomez deleted the rollup-6xjf6zn branch May 6, 2025 09:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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. 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