Skip to content

Rollup of 10 pull requests #142550

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 26 commits into from
Jun 16, 2025
Merged

Rollup of 10 pull requests #142550

merged 26 commits into from
Jun 16, 2025

Conversation

fmease
Copy link
Member

@fmease fmease commented Jun 15, 2025

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

WaffleLapkin and others added 26 commits June 3, 2025 10:49
And move passing it to the linker to the driver code.
This deduplicates some code between codegen backends and may in the
future allow adding extra metadata that is only known at link time.
This test currently fails (as expected).

    --- stderr -------------------------------
    Pretty-printer lost necessary parentheses
      BEFORE: (#[attr] loop {}).field
       AFTER: #[attr] loop {}.field
    ------------------------------------------
Reduce precedence of expressions that have an outer attr

Previously, `-Zunpretty=expanded` would expand this program as follows:

```rust
#![feature(stmt_expr_attributes)]

macro_rules! repro {
    ($e:expr) => {
        #[allow(deprecated)] $e
    };
}

#[derive(Default)]
struct Thing {
    #[deprecated]
    field: i32,
}

fn main() {
    let thing = Thing::default();
    let _ = repro!(thing).field;
}
```

```rs
#![feature(prelude_import)]
#![feature(stmt_expr_attributes)]
#[prelude_import]
use std::prelude::rust_2021::*;
#[macro_use]
extern crate std;

struct Thing {
    #[deprecated]
    field: i32,
}

#[automatically_derived]
impl ::core::default::Default for Thing {
    #[inline]
    fn default() -> Thing {
        Thing { field: ::core::default::Default::default() }
    }
}

fn main() {
    let thing = Thing::default();
    let _ = #[allow(deprecated)] thing.field;
}
```

This is not the correct expansion. The correct output would have `(#[allow(deprecated)] thing).field` with the attribute applying only to `thing`, not to `thing.field`.
…ork, r=workingjubilee,saethlin

Move metadata object generation for dylibs to the linker code

This deduplicates some code between codegen backends and may in the future allow adding extra metadata that is only known at link time.

Prerequisite of rust-lang#96708.
… r=oli-obk,traviscross

Report never type lints in dependencies

This PR marks never type lints (`never_type_fallback_flowing_into_unsafe` & `dependency_on_unit_never_type_fallback`) to be included in cargo's reports / to be emitted when they happen in dependencies.

This PR is based on rust-lang#141936
r? oli-obk
…-live-dead-fix, r=oli-obk

Async drop - fix for StorageLive/StorageDead codegen for pinned future

Fixes: rust-lang#140429, Fixes: rust-lang#140531, Fixes: rust-lang#141761, Fixes: rust-lang#141409.

StorageLive/StorageDead codegen is corrected for pinned async drop future.
Apply ABI attributes on return types in `rustc_codegen_cranelift`

- The [x86-64 System V ABI standard](https://gitlab.com/x86-psABIs/x86-64-ABI/-/jobs/artifacts/master/raw/x86-64-ABI/abi.pdf?job=build) doesn't sign/zero-extend integer arguments or return types.
- But the de-facto standard as implemented by Clang and GCC is to sign/zero-extend arguments to 32 bits (but not return types).
- Additionally, Apple targets [sign/zero-extend both arguments and return values to 32 bits](https://developer.apple.com/documentation/xcode/writing-64-bit-intel-code-for-apple-platforms#Pass-arguments-to-functions-correctly).
- However, the `rustc_target` ABI adjustment code currently [unconditionally extends both arguments and return values to 32 bits](https://github.com/rust-lang/rust/blame/e703dff8fe220b78195c53478e83fb2f68d8499c/compiler/rustc_target/src/callconv/x86_64.rs#L240) on all targets.
- This doesn't cause a miscompilation when compiling with LLVM as LLVM will ignore the `signext`/`zeroext` attribute when applied to return types on non-Apple x86-64 targets.
- Cranelift, however, does not have a similar special case, requiring `rustc` to set the argument extension attribute correctly.
- However, `rustc_codegen_cranelift` doesn't currently apply ABI attributes to return types at all, meaning `rustc_codegen_cranelift` will currently miscompile `i8`/`u8`/`i16`/`u16` returns on x86-64 Apple targets as those targets require sign/zero-extension of return types.

This PR fixes the bug(s) by making the `rustc_target` x86-64 System V ABI only mark return types as sign/zero-extended on Apple platforms, while also making `rustc_codegen_cranelift` apply ABI attributes to return types. The RISC-V and s390x C ABIs also require sign/zero extension of return types, so this will fix those targets when building with `rustc_codegen_cranelift` too.

r? `````@bjorn3`````
Add `f16` inline asm support for LoongArch

r? `````@Amanieu`````
…-run-bootstrap, r=Kobzol

Remove check run bootstrap

This PR migrates all usage of check_run to new execution context api's.

r? `@Kobzol`
…mease

Suggest adding semicolon in user code rather than macro impl details

This PR tries to find the right span (by peeling expansion) so that the suggestion for adding a semicolon is suggested in user code rather than in the expanded code (in the example a macro impl).

Fixes rust-lang#139049
r? `@fmease`
@rustbot rustbot added A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. A-meta Area: Issues & PRs about the rust-lang/rust repository itself 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) labels Jun 15, 2025
@rustbot rustbot added T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. rollup A PR which is a rollup labels Jun 15, 2025
@fmease
Copy link
Member Author

fmease commented Jun 15, 2025

@bors r+ rollup=never p=5

@bors
Copy link
Collaborator

bors commented Jun 15, 2025

📌 Commit 0704864 has been approved by fmease

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

bors commented Jun 16, 2025

⌛ Testing commit 0704864 with merge e314b97...

@bors
Copy link
Collaborator

bors commented Jun 16, 2025

☀️ Test successful - checks-actions
Approved by: fmease
Pushing e314b97 to master...

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

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#133952 Remove wasm legacy abi 6c0e0a2676002dcbc80939c0ec988041ba9be30d (link)
#134661 Reduce precedence of expressions that have an outer attr 19a26df0703ac75be049e5d4642c505cb514e2b3 (link)
#141769 Move metadata object generation for dylibs to the linker co… f87cabcbb718d870fc7e74d534f056a9a3a293aa (link)
#141937 Report never type lints in dependencies 6ff159ef64d9aa996932d5850b479a72aca417f5 (link)
#142347 Async drop - fix for StorageLive/StorageDead codegen for pi… ff924a35efabda50b88a520af4bc0aeff58e420a (link)
#142389 Apply ABI attributes on return types in `rustc_codegen_cran… d7afdae6af1014e5cae15d5d9520a6c1c8d005a0 (link)
#142470 Add some missing mailmap entries 4f00b9af960f8e6f3ec6e36dd9168eed8e2ffe9e (link)
#142481 Add f16 inline asm support for LoongArch 2627d180e18841647daa9dd28f806cc1f8c2fbce (link)
#142499 Remove check run bootstrap 5b85d7414728ade91a1ee00522a5587a4eefa2ea (link)
#142543 Suggest adding semicolon in user code rather than macro imp… 020a11f06ff8e8f26aa41a7c54d4840cbf0e7d5c (link)

previous master: f768dc01da

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 f768dc0 (parent) -> e314b97 (this PR)

Test differences

Show 427 test diffs

Stage 1

  • errors::verify_codegen_ssa_aarch64_softfloat_neon_137: [missing] -> pass (J0)
  • errors::verify_codegen_ssa_aarch64_softfloat_neon_138: pass -> [missing] (J0)
  • errors::verify_codegen_ssa_aix_strip_not_used_132: [missing] -> pass (J0)
  • errors::verify_codegen_ssa_aix_strip_not_used_133: pass -> [missing] (J0)
  • errors::verify_codegen_ssa_compiler_builtins_cannot_call_130: [missing] -> pass (J0)
  • errors::verify_codegen_ssa_dlltool_fail_import_library_126: [missing] -> pass (J0)
  • errors::verify_codegen_ssa_dlltool_fail_import_library_127: pass -> [missing] (J0)
  • errors::verify_codegen_ssa_error_calling_dlltool_128: [missing] -> pass (J0)
  • errors::verify_codegen_ssa_error_creating_import_library_132: pass -> [missing] (J0)
  • errors::verify_codegen_ssa_error_creating_remark_dir_129: [missing] -> pass (J0)
  • errors::verify_codegen_ssa_error_creating_remark_dir_130: pass -> [missing] (J0)
  • errors::verify_codegen_ssa_error_writing_def_file_127: [missing] -> pass (J0)
  • errors::verify_codegen_ssa_error_writing_def_file_128: pass -> [missing] (J0)
  • errors::verify_codegen_ssa_failed_to_get_layout_125: [missing] -> pass (J0)
  • errors::verify_codegen_ssa_failed_to_get_layout_126: pass -> [missing] (J0)
  • errors::verify_codegen_ssa_forbidden_target_feature_attr_124: [missing] -> pass (J0)
  • errors::verify_codegen_ssa_forbidden_target_feature_attr_125: pass -> [missing] (J0)
  • errors::verify_codegen_ssa_illegal_link_ordinal_format_122: [missing] -> pass (J0)
  • errors::verify_codegen_ssa_illegal_link_ordinal_format_123: pass -> [missing] (J0)
  • errors::verify_codegen_ssa_invalid_link_ordinal_nargs_121: [missing] -> pass (J0)
  • errors::verify_codegen_ssa_invalid_link_ordinal_nargs_122: pass -> [missing] (J0)
  • errors::verify_codegen_ssa_invalid_monomorphization_basic_float_type_85: [missing] -> pass (J0)
  • errors::verify_codegen_ssa_invalid_monomorphization_basic_integer_type_84: [missing] -> pass (J0)
  • errors::verify_codegen_ssa_invalid_monomorphization_cannot_return_110: [missing] -> pass (J0)
  • errors::verify_codegen_ssa_invalid_monomorphization_cannot_return_111: pass -> [missing] (J0)
  • errors::verify_codegen_ssa_invalid_monomorphization_cast_wide_pointer_114: [missing] -> pass (J0)
  • errors::verify_codegen_ssa_invalid_monomorphization_cast_wide_pointer_115: pass -> [missing] (J0)
  • errors::verify_codegen_ssa_invalid_monomorphization_expected_element_type_111: [missing] -> pass (J0)
  • errors::verify_codegen_ssa_invalid_monomorphization_expected_element_type_112: pass -> [missing] (J0)
  • errors::verify_codegen_ssa_invalid_monomorphization_expected_pointer_115: [missing] -> pass (J0)
  • errors::verify_codegen_ssa_invalid_monomorphization_expected_return_type_107: [missing] -> pass (J0)
  • errors::verify_codegen_ssa_invalid_monomorphization_expected_return_type_108: pass -> [missing] (J0)
  • errors::verify_codegen_ssa_invalid_monomorphization_expected_usize_117: pass -> [missing] (J0)
  • errors::verify_codegen_ssa_invalid_monomorphization_expected_vector_element_type_119: [missing] -> pass (J0)
  • errors::verify_codegen_ssa_invalid_monomorphization_expected_vector_element_type_120: pass -> [missing] (J0)
  • errors::verify_codegen_ssa_invalid_monomorphization_inserted_type_105: [missing] -> pass (J0)
  • errors::verify_codegen_ssa_invalid_monomorphization_invalid_bitmask_96: [missing] -> pass (J0)
  • errors::verify_codegen_ssa_invalid_monomorphization_mask_wrong_element_type_109: [missing] -> pass (J0)
  • errors::verify_codegen_ssa_invalid_monomorphization_mask_wrong_element_type_110: pass -> [missing] (J0)
  • errors::verify_codegen_ssa_invalid_monomorphization_mismatched_lengths_109: pass -> [missing] (J0)
  • errors::verify_codegen_ssa_invalid_monomorphization_return_element_103: [missing] -> pass (J0)
  • errors::verify_codegen_ssa_invalid_monomorphization_return_element_104: pass -> [missing] (J0)
  • errors::verify_codegen_ssa_invalid_monomorphization_return_integer_type_100: [missing] -> pass (J0)
  • errors::verify_codegen_ssa_invalid_monomorphization_return_integer_type_101: pass -> [missing] (J0)
  • errors::verify_codegen_ssa_invalid_monomorphization_return_length_102: [missing] -> pass (J0)
  • errors::verify_codegen_ssa_invalid_monomorphization_return_length_input_type_97: [missing] -> pass (J0)
  • errors::verify_codegen_ssa_invalid_monomorphization_return_length_input_type_98: pass -> [missing] (J0)
  • errors::verify_codegen_ssa_invalid_monomorphization_return_type_107: pass -> [missing] (J0)
  • errors::verify_codegen_ssa_invalid_monomorphization_second_argument_length_98: [missing] -> pass (J0)
  • errors::verify_codegen_ssa_invalid_monomorphization_simd_argument_91: pass -> [missing] (J0)
  • errors::verify_codegen_ssa_invalid_monomorphization_simd_first_92: [missing] -> pass (J0)
  • errors::verify_codegen_ssa_invalid_monomorphization_simd_first_93: pass -> [missing] (J0)
  • errors::verify_codegen_ssa_invalid_monomorphization_simd_index_out_of_bounds_105: pass -> [missing] (J0)
  • errors::verify_codegen_ssa_invalid_monomorphization_simd_return_95: [missing] -> pass (J0)
  • errors::verify_codegen_ssa_invalid_monomorphization_simd_return_96: pass -> [missing] (J0)
  • errors::verify_codegen_ssa_invalid_monomorphization_simd_second_93: [missing] -> pass (J0)
  • errors::verify_codegen_ssa_invalid_monomorphization_simd_shuffle_101: [missing] -> pass (J0)
  • errors::verify_codegen_ssa_invalid_monomorphization_simd_shuffle_102: pass -> [missing] (J0)
  • errors::verify_codegen_ssa_invalid_monomorphization_simd_third_94: [missing] -> pass (J0)
  • errors::verify_codegen_ssa_invalid_monomorphization_simd_third_95: pass -> [missing] (J0)
  • errors::verify_codegen_ssa_invalid_monomorphization_third_argument_length_99: [missing] -> pass (J0)
  • errors::verify_codegen_ssa_invalid_monomorphization_unrecognized_intrinsic_89: [missing] -> pass (J0)
  • errors::verify_codegen_ssa_invalid_monomorphization_unsupported_cast_117: [missing] -> pass (J0)
  • errors::verify_codegen_ssa_invalid_monomorphization_unsupported_cast_118: pass -> [missing] (J0)
  • errors::verify_codegen_ssa_invalid_monomorphization_unsupported_symbol_114: pass -> [missing] (J0)
  • errors::verify_codegen_ssa_invalid_monomorphization_unsupported_symbol_of_size_112: [missing] -> pass (J0)
  • errors::verify_codegen_ssa_invalid_monomorphization_unsupported_symbol_of_size_113: pass -> [missing] (J0)
  • errors::verify_codegen_ssa_invalid_no_sanitize_120: [missing] -> pass (J0)
  • errors::verify_codegen_ssa_invalid_no_sanitize_121: pass -> [missing] (J0)
  • errors::verify_codegen_ssa_metadata_object_file_write_82: pass -> [missing] (J0)
  • errors::verify_codegen_ssa_mixed_export_name_and_no_mangle_133: [missing] -> pass (J0)
  • errors::verify_codegen_ssa_mixed_export_name_and_no_mangle_134: pass -> [missing] (J0)
  • errors::verify_codegen_ssa_shuffle_indices_evaluation_83: [missing] -> pass (J0)
  • errors::verify_codegen_ssa_shuffle_indices_evaluation_84: pass -> [missing] (J0)
  • errors::verify_codegen_ssa_target_feature_safe_trait_123: [missing] -> pass (J0)
  • errors::verify_codegen_ssa_target_feature_safe_trait_124: pass -> [missing] (J0)
  • errors::verify_codegen_ssa_xcrun_failed_invoking_134: [missing] -> pass (J0)
  • errors::verify_codegen_ssa_xcrun_failed_invoking_135: pass -> [missing] (J0)
  • [crashes] tests/crashes/140429.rs: pass -> [missing] (J1)
  • [crashes] tests/crashes/140531.rs: pass -> [missing] (J1)
  • [mir-opt] tests/mir-opt/async_drop_live_dead.rs: [missing] -> pass (J1)
  • [ui] tests/ui/abi/numbers-arithmetic/x86-64-sysv64-arg-ext.rs#apple: [missing] -> ignore (only executed when the target vendor is Apple) (J1)
  • [ui] tests/ui/abi/numbers-arithmetic/x86-64-sysv64-arg-ext.rs#other: [missing] -> pass (J1)
  • [ui] tests/ui/async-await/async-drop/live-dead-storage2.rs: [missing] -> pass (J1)
  • [ui] tests/ui/async-await/async-drop/live-dead-storage3.rs: [missing] -> pass (J1)
  • [ui] tests/ui/async-await/async-drop/live-dead-storage4.rs: [missing] -> pass (J1)
  • [ui] tests/ui/borrowck/span-semicolon-issue-139049.rs: [missing] -> pass (J1)
  • [ui] tests/ui/lint/wasm_c_abi_transition.rs: pass -> [missing] (J1)

Stage 2

  • [ui] tests/ui/abi/numbers-arithmetic/x86-64-sysv64-arg-ext.rs#apple: [missing] -> pass (J2)
  • [crashes] tests/crashes/140429.rs: pass -> [missing] (J3)
  • [crashes] tests/crashes/140531.rs: pass -> [missing] (J3)
  • [mir-opt] tests/mir-opt/async_drop_live_dead.rs: [missing] -> pass (J3)
  • [ui] tests/ui/async-await/async-drop/live-dead-storage.rs: [missing] -> pass (J4)
  • [ui] tests/ui/async-await/async-drop/live-dead-storage2.rs: [missing] -> pass (J4)
  • [ui] tests/ui/async-await/async-drop/live-dead-storage3.rs: [missing] -> pass (J4)
  • [ui] tests/ui/borrowck/span-semicolon-issue-139049.rs: [missing] -> pass (J4)
  • [ui] tests/ui/abi/numbers-arithmetic/x86-64-sysv64-arg-ext.rs#other: [missing] -> ignore (ignored when the target vendor is Apple) (J5)
  • [ui] tests/ui/abi/numbers-arithmetic/x86-64-sysv64-arg-ext.rs#other: [missing] -> pass (J6)
  • [ui] tests/ui/abi/numbers-arithmetic/x86-64-sysv64-arg-ext.rs#apple: [missing] -> ignore (only executed when the architecture is x86_64) (J7)
  • [ui] tests/ui/abi/numbers-arithmetic/x86-64-sysv64-arg-ext.rs#other: [missing] -> ignore (only executed when the architecture is x86_64) (J8)

(and 40 additional test diffs)

Additionally, 287 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 e314b97ee54091b6bcf33db4770c93d82fded8bc --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. aarch64-apple: 3706.8s -> 5017.7s (35.4%)
  2. x86_64-apple-2: 3570.2s -> 4492.8s (25.8%)
  3. dist-aarch64-apple: 4807.9s -> 6000.1s (24.8%)
  4. dist-x86_64-apple: 8252.6s -> 9719.0s (17.8%)
  5. mingw-check-1: 1621.7s -> 1877.1s (15.7%)
  6. i686-gnu-2: 5334.0s -> 6098.5s (14.3%)
  7. i686-gnu-nopt-1: 7114.8s -> 8000.6s (12.5%)
  8. aarch64-gnu-debug: 3583.2s -> 3982.3s (11.1%)
  9. dist-apple-various: 6116.2s -> 6719.9s (9.9%)
  10. i686-gnu-1: 7328.5s -> 8029.5s (9.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 (e314b97): comparison URL.

Overall result: ✅ improvements - no action needed

@rustbot label: -perf-regression

Instruction count

Our most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.

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

Max RSS (memory usage)

Results (secondary 2.7%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
2.7% [2.7%, 2.7%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Cycles

Results (secondary 9.9%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
9.9% [9.9%, 9.9%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Binary size

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

Bootstrap: 756.159s -> 756.881s (0.10%)
Artifact size: 372.14 MiB -> 372.07 MiB (-0.02%)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. A-meta Area: Issues & PRs about the rust-lang/rust repository itself 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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.