Rollup of 9 pull requests - #160810
Closed
JonathanBrouwer wants to merge 19 commits into
Closed
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.
…g fs functions to utilize with_native_path, and move exists to use with_native_path
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.
… r=Mark-Simulacrum Implemented different with_native_path conversion methods, refactoring fs functions to utilize with_native_path, and move exists to use with_native_path This PR attempts to complete the FIXME comment on trying to introduce the different conversion functions of `with_native_path` on all supported platforms and also moves the `exists` filesystem functions to utilize `with_native_path`. It should be easier to make `readdir` and `remove_dir_all` utilize `with_native_path`, which I'm down to support that transition in a separate PR. I took note on what each platform fs functions does underneath the hood to decide the argument it should take: * On Hermit and Vexos they use `run_path_with_cstr` just like Unix, so it was clear for their fs functions to take a `&CStr` * Motor always converts the `&Path` to `&str`, so I just changed the arguments to `&str` * Solid uses an internal `cstr` function that converts a `&Path` to `io::Result<CString>`, so I made its fs functions take in a `&CStr` anyways * On uefi, as far as I'm aware every of its fs function ends up calling `crate::path::absolute`(returns a `Result<PathBuf>`) or `uefi_fs::File::from_path`, which calls on `crate::path::absolute` anyways, so it made sense for me to make its fs functions take a `PathBuf`. I did some other refactoring such as putting `with_native_path` functions within `std/src/sys/path` (except for `unsupported.rs` which has `with_native_path` implemented within its file). I thought it made sense to centralize the different `with_native_path` (aside from `run_path_with_cstr` can just use the alias `with_native_path`) functions there considering that's done for Windows. I also renamed the `unsupported_backslash.rs` file to `solid.rs` because it seems like solid is the only one that utilizes that file; the `unix.rs` file was renamed to `common.rs` because that's used by unix platforms, motor, and other miscellaneous platforms (motor platform has a different `with_native_path` implementation however). If there's anything here that I should revert or change from platform to platform, just let me know.
…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.
Contributor
Author
Contributor
This comment has been minimized.
This comment has been minimized.
rust-bors Bot
pushed a commit
that referenced
this pull request
Aug 9, 2026
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
Collaborator
|
The job Click to see the possible cause of the failure (guessed by this bot) |
Contributor
|
PR #159805, which is a member of this rollup, was unapproved. This rollup was thus unapproved. |
Contributor
|
💔 Test for fd0bd4d failed: CI. Failed job:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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