Rollup of 9 pull requests - #160814
Conversation
It was never used in that crate, so rustc_parse is the next obvious place to go. It's also used by rustc_hir_typeck, but sharing diagnostics between crates makes it easy for such things to become dead, so duplicate it.
And fix support for multi-line attributes. And add some tests.
…recondition” style.
rustc_attr_ir: fix up `lang_items` imports Cleanup after splitting attributes from rustc_hir. It's a big one and maybe annoying to merge without conflicts but I figured it's best to just get it done and over with. If it turns out to be too big to merge at once it should be possible to split it up tho :> r? @JonathanBrouwer
…ked-functions, r=tiif stabilize `c_variadic_naked_functions` tracking issue: rust-lang#148767 reference PR: rust-lang/reference#2321 # Stabilization report ## Summary Stabilize the ability to use `#[unsafe(naked)]` functions to define c-variadic functions. These c-variadic naked functions accept the same set of ABIs as c-variadic foreign functions, this set is larger than what we currently accept for c-variadic definitions. ```rust #[unsafe(naked)] unsafe extern "aapcs" fn variadic_aapcs(_: f64, _: ...) -> f64 { core::arch::naked_asm!( r#" sub sp, sp, rust-lang#12 stmib sp, {{r2, r3}} vmov d0, r0, r1 add r0, sp, rust-lang#4 vldr d1, [sp, rust-lang#4] add r0, r0, rust-lang#15 bic r0, r0, rust-lang#7 vadd.f64 d0, d0, d1 add r1, r0, rust-lang#8 str r1, [sp] vldr d1, [r0] vadd.f64 d0, d0, d1 vmov r0, r1, d0 add sp, sp, rust-lang#12 bx lr "#, ) } ``` ## Accepted ABIs The set of accepted ABIs is the same as for c-variadic foreign functions, defined as rule [`items.extern.variadic.conventions`](https://doc.rust-lang.org/nightly/reference/items/external-blocks.html?highlight=externblo#r-items.extern.variadic.conventions): - `"aapcs"` - `"C"` - `"cdecl"` - `"efiapi"` - `"system"` - `"sysv64"` - `"win64"` And their corresponding `-unwind` variants. Given that naked functions desugar to a block of module assembly and a foreign definition, it makes sense to support the same set as source-level foreign definitions. For c-variadic definitions we only accept `"C"` and `"C-unwind"`. ## Multiple c-variadic ABIs in the same program LLVM supports c-variadic calls of different ABIs in the same program. We test both an arm and x86 configuration - https://github.com/rust-lang/rust/blob/771916f9028e7fe56d2685f2c4f698de5d7d6a45/tests/ui/c-variadic/same-program-multiple-abis-arm.rs - https://github.com/rust-lang/rust/blob/771916f9028e7fe56d2685f2c4f698de5d7d6a45/tests/ui/c-variadic/same-program-multiple-abis-x86_64.rs Note that GCC, Clang and LLVM do not support c-variadic definitions of multiple ABIs: the `va_start`, `va_arg` etc. macros are always expanded using the default C calling convention. Clang and GCC reject a variable argument list on definitions that use a non-default calling convention. ## History - [#t-lang > C-variadic naked functions](https://rust-lang.zulipchat.com/#narrow/channel/213817-t-lang/topic/C-variadic.20naked.20functions/with/554593886) - rust-lang#148770 The stabilization report of `feature(c_variadic)` mentions this feature: - rust-lang#155697 ## Unresolved questions None.
…idy, r=Mark-Simulacrum Refactor tidy detection of stability attribute And fix support for multi-line attributes. And add some tests. Necessary for rust-lang#160108 which confused tidy.
…r=JonathanBrouwer make more diagnostic structs pub(crate)
…nBrouwer Add regression test for cycle error on guaranteed unsized self type Closes rust-lang#116914 the solver now detects the cycle and errors, which this pins
arm64ec: `f128` is supported since LLVM 23 tracking issue: rust-lang#116909 - [x] I did not use an LLM to create a change in this PR. - [ ] I used an LLM to create a change in this PR, and I have explained below how it was used. Related - llvm/llvm-project#94434 - llvm/llvm-project#206980 cc @dpaoliello (feel free to approve also, and maybe you can validate this in practice?) r? tgross35
Add regression test for save temps ICE on incremental recompile Closes rust-lang#66367 adds an incremental regression test for adding -C save-tempsthat used to ICE
…=Mark-Simulacrum User facing .expect now follows “expect as precondition" style Related issue: rust-lang#159751 Updated .expect error message in std/src/net/tcp.rs to follow “expect as precondition" style.
…d.rs, r=nia-e Change .expect message to follow precondition style
Rollup of 9 pull requests try-job: dist-various-1 try-job: test-various try-job: x86_64-gnu-aux try-job: x86_64-gnu-llvm-21-3 try-job: x86_64-msvc-1 try-job: aarch64-apple-1 try-job: aarch64-apple-2 try-job: x86_64-mingw-1 try-job: i686-msvc-1 try-job: i686-msvc-2
This comment has been minimized.
This comment has been minimized.
|
📌 Perf builds for each rolled up PR:
previous master: 5c16940f0d In the case of a perf regression, run the following command for each PR you suspect might be the cause: |
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 5c16940 (parent) -> 969b803 (this PR) Test differencesShow 388 test diffsStage 0
Stage 1
Stage 2
Additionally, 377 doctest diffs were found. These are ignored, as they are noisy. Job group index
Test dashboardRun cargo run --manifest-path src/ci/citool/Cargo.toml -- \
test-dashboard 969b803cbe1d4499f841ae0a49c637d8c70a0458 --output-dir test-dashboardAnd then open Job duration changes
How to interpret the job duration changes?Job durations can vary a lot, based on the actual runner instance |
|
Finished benchmarking commit (969b803): comparison URL. Overall result: ✅ improvements - no action needed@rustbot label: -perf-regression Instruction countOur most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.
Max RSS (memory usage)Results (primary 3.5%, secondary 0.6%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (primary 2.3%, secondary 0.7%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeResults (primary 0.1%, secondary 0.0%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Bootstrap: 461.157s -> 458.441s (-0.59%) |
Successful merges:
lang_itemsimports #160782 (rustc_attr_ir: fix uplang_itemsimports)c_variadic_naked_functions#159746 (stabilizec_variadic_naked_functions)f128is supported since LLVM 23 #160779 (arm64ec:f128is supported since LLVM 23)r? @ghost
Create a similar rollup