[codex] arm64e upstream PR integration validation#6
Draft
[codex] arm64e upstream PR integration validation#6
Conversation
The described issue in the reverted commit is no longer relevant. This reverts commit 870ab266bad7ec0a56abfc433f92e3c2d67a572c.
…publishing publish via trusted publishing
Resolve the following lints:
* `unpinned-uses`: Pin action versions using `zizmor --fix`
* `excessive-permissions`: Add `permissions: {}` to all workflows
* `template-injection`: This one wasn't too concerning since `${{ ...
}}` was only used for `matrix` and `needs` access, but it is easy
enough to resolve by storing in an environment variable.
Based on the configuration for bors [1]. [1]: https://github.com/rust-lang/bors/blob/d89bfc24e8e7add3b03af3ab7307cd3b2a1af879/.github/renovate.json5
Resolve two cases of `ref-version-mismatch` and various `artipacked` instances.
Use the same trick as with other formatting implementations, which makes it possible to get rid of the awkward `-> String` functions.
Add wrappers for compiler-builtins that closer match the libm interfaces, and add basic compiler-builtins float arithmetic to the set of tested functions. This means we now get tests against MPFR, better edge case coverage, extensive testing, and benchmarks for the following functions: * `__add[hsdt]f3` * `__sub[hsdt]f3` * `__mul[hsdt]f3` * `__div[sdt]f3` * `__powi[sdt]f2` Functions from compiler-builtins have not yet been tied in with `update-api-list.py` and the CI tooling that reads it, that will need to be updated in a follow up.
Add the following to our larger test infrastructure: * `__eq[hsdf]2` * `__ne[hsdf]2` * `__unord[hsdf]2` * `__lt[hsdf]2` * `__le[hsdf]2` * `__gt[hsdf]2` * `__ge[hsdf]2`
Add the following to the test infrastructure: * `__extenddftf2` * `__extendhfdf2` * `__extendhfsf2` * `__extendhftf2` * `__extendsfdf2` * `__extendsftf2` * `__truncdfhf2` * `__truncdfsf2` * `__truncsfhf2` * `__trunctfdf2` * `__trunctfhf2` * `__trunctfsf2`
Wire up benchmarks for functions that are now part of our testing infrastructure.
Create a new struct `Hex` that serves all of these purposes via a new trait `DisplayHex`. This is easier to work with because we can make `DisplayHex` a bound of `Float`.
This allows us to use a single base name for functions that have multiple types in the signature, such as `extend_f32_f64`. The compiler-builtins `trunc` operation wrappers had to be renamed to `narrow` to avoid conflicting with libm `trunc`.
Add the following to the test infrastructure: * `__fixdfdi` * `__fixdfsi` * `__fixdfti` * `__fixsfdi` * `__fixsfsi` * `__fixsfti` * `__fixtfdi` * `__fixtfsi` * `__fixtfti` * `__fixunsdfdi` * `__fixunsdfsi` * `__fixunsdfti` * `__fixunssfdi` * `__fixunssfsi` * `__fixunssfti` * `__fixunstfdi` * `__fixunstfsi` * `__fixunstfti`
The .dockerenv check was a workaround for Docker CI where the checkout is mounted read-only. However, its presence does not reliably indicate that the filesystem is unwritable. Use CARGO_TARGET_DIR as the condition instead, which directly captures when a custom writable target directory is in use and avoids false assumptions.
There isn't anything special about its implementation, so make it normal code to clean some things up.
Make it possible to access each argument without relying on `FTy`.
We can always access individual arguments rather than relying on the common `FTy` type. This is a cleaner design anyway since it handles functions with integers in the signature better.
the types are exported from `core::ffi` itself
Permit `{This}` in diagnostic attribute format literals
My motivation was that yesterday I wanted to write something like this and reference `$name` in the string literal.
```rust
pub mod sym {
// stuff here
}
macro_rules! my_macro {
($name:ident $(,)?) => {{
#[diagnostic::on_unknown(
message = "this is not present in symbol table",
note = "you must add it to rustc_span::symbol::symbol!"
)]
use sym::$name as name;
// ...
}}
}
```
That is (as far as I can tell) impossible or at least very unergonomic. This adds the ability to just reference the name of the item the attribute is on. I imagine that's useful for use inside macros generally, so it's also added for some other attributes.
The affected attributes are all unstable, it is not implemented for diagnostic::on_unimplemented (will do in its own PR).
Note that `{This}` is already usable in `#[rustc_on_unimplemented]`, so this does not implement it but just enables some more.
This PR also migrates one lint away from AttributeLintKind, and improves the messages for that lint.
…r=tgross35 make the `core::ffi::va_list` module private tracking issue: rust-lang#44930 the types are exported from `core::ffi` itself. T-libs-api decided that we should only export the types from `core::ffi`, and should not make `core::ffi::va_list` public, see rust-lang#44930 (comment). r? tgross35
… r=WaffleLapkin cmse: test returning `MaybeUninit<T>` tracking issue: rust-lang#81391 tracking issue: rust-lang#75835 Some tests from rust-lang#147697 that already work and are useful. Extracting them shrinks that (currently blocked) PR. The code in `tests/ui/cmse-nonsecure/cmse-nonsecure-call/return-via-stack.rs` checks that `MaybeUninit<T>` is considered abi-compatible with `T`. The code in `tests/ui/cmse-nonsecure/cmse-nonsecure-entry/params-via-stack.rs` really only tests that no errors/warnings are emitted. r? davidtwco
…lush, r=WaffleLapkin std: Refactor BufWriter::flush to use the `?` operator Functionally, this is equivalent and may be slightly more amenable to inlining.
Co-authored-by: Camille Gillot <gillot.camille@gmail.com>
…nathanBrouwer Rollup of 3 pull requests Successful merges: - rust-lang#155754 (make the `core::ffi::va_list` module private) - rust-lang#155522 (cmse: test returning `MaybeUninit<T>`) - rust-lang#155741 (std: Refactor BufWriter::flush to use the `?` operator)
Update cargo submodule 10 commits in 06ac0e7c05770a8c7bbf67bdd12fa1a1eefdc8ae..eb9b60f1f6604b5e022c56be31692c215b8ba11d 2026-04-21 15:33:56 +0000 to 2026-04-24 20:52:07 +0000 - chore: Remove unused deps (rust-lang/cargo#16938) - feat(compile): Stabilize `build.warnings` (rust-lang/cargo#16796) - cargo clean: do not error if explicitly specified target-dir does not exist (rust-lang/cargo#16934) - Revert "feat(lints): Add unused deps ignore list" (rust-lang/cargo#16937) - fix(compile): Ignore unused deps if also transitive (rust-lang/cargo#16935) - Update rustls (rust-lang/cargo#16932) - chore(deps): update rust crate openssl to v0.10.78 [security] (rust-lang/cargo#16931) - chore(build-rs): Ensure we lint the crate (rust-lang/cargo#16930) - Fix flaky test: proc_macro_in_artifact_dep (rust-lang/cargo#16922) - refactor(compile): Log all ignored unused externs (rust-lang/cargo#16920) r? ghost
19c7ec9 to
5fc2f15
Compare
…t-dollar-suggestion, r=eholk Improve suggestion for $-prefixed fragment specifiers Fixes rust-lang#155505
… r=adwinwhite Avoid redundant clone suggestions in borrowck diagnostics Fixes rust-lang#153886 Removed redundant `.clone()` suggestions. I found that there are two patterns to handle this issue while I was implementing: - Should suggest only UFCS - Should suggest only simple `.clone()` For the target issue, we can just remove the UFCS (`<Option<String> as Clone>::clone(&selection.1)`) side. However, for the `BorrowedContentSource::OverloadedDeref` pattern like `Rc<Vec<i32>>`, for instance the `borrowck-move-out-of-overloaded-auto-deref.rs` test case, I think we need to employ the UFCS way. The actual test case is: ```rust //@ run-rustfix use std::rc::Rc; pub fn main() { let _x = Rc::new(vec![1, 2]).into_iter(); //~^ ERROR [E0507] } ``` And another error will be shown if we simply use the simple `.clone()` pattern. Like: ```rust use std::rc::Rc; pub fn main() { let _x = Rc::new(vec![1, 2]).clone().into_iter(); } ``` then we will get ``` error[E0507]: cannot move out of an `Rc` --> src/main.rs:5:14 | 5 | let _x = Rc::new(vec![1, 2]).clone().into_iter(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ----------- value moved due to this method call | | | move occurs because value has type `Vec<i32>`, which does not implement the `Copy` trait | note: `into_iter` takes ownership of the receiver `self`, which moves value --> /playground/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/iter/traits/collect.rs:310:18 | 310 | fn into_iter(self) -> Self::IntoIter; | ^^^^ help: you can `clone` the value and consume it, but this might not be your desired behavior | 5 - let _x = Rc::new(vec![1, 2]).clone().into_iter(); 5 + let _x = <Vec<i32> as Clone>::clone(&Rc::new(vec![1, 2])).into_iter(); | For more information about this error, try `rustc --explain E0507`. ``` [Rust Playground](https://play.rust-lang.org/?version=stable&mode=debug&edition=2024&gist=7e767bed3f1c573c03642f20f454ed03) In this case, `Rc::clone` only increments the reference count and returns a new `Rc<Vec<i32>>`; it does not grant ownership of the inner `Vec<i32>`. As a result, calling into_iter() attempts to move the `Vec<i32>`, leading to the same E0507 error again. On the other hand, in UFCS form: ``` <Vec<i32> as Clone>::clone(&Rc::new(vec![1, 2])).into_iter() ``` This explicitly calls `<Vec<i32> as Clone>::clone`, and the argument `&Rc<Vec<i32>>` is treated as `&Vec<i32>` via Rc’s `Deref` implementation. As a result, the `Vec<i32>` itself is cloned, yielding an owned `Vec<i32>`, which allows `into_iter()` to succeed, if my understanding is correct. I addressed the issue as far as I could find the edge cases but please advice me if I'm overlooking something.
Exposing Float Masks Tracking issue: rust-lang#154064 ACP: rust-lang/libs-team#753
…illot Handle index projections in call destinations in DSE Since call destinations are evaluated after call arguments, we can't turn copy arguments into moves if the same local is later used as an index projection in the call destination. DSE call arg optimization: rust-lang#113758 r? @cjgillot cc @RalfJung
bootstrap: Don't clone submodules unconditionally in dry-run This made it very annoying to debug bootstrap itself, because every `--dry-run` invocation would start out by cloning LLVM, which is almost never necessary. Instead change a few Steps to properly support dry_run when no submodule is checked out. I tested this by running all of `check`, `build`, `doc`, `dist`, `install`, `vendor`, `clippy`, `fix`, and `miri` with `--dry-run`.
…youxu Account for `GetSyntheticValue` failures `GetSyntheticValue` returns an invalid `SBValue` if no synthetic is present. That wasn't a problem before when we were attaching synthetics to every type, but it won't be the case once github.com/rust-lang/pull/155336 or similar lands. Additionally, codelldb subverts `lldb_commands` to apply similar behavior that doesn't attach synthetics to every type, so this fixes a regression there too. Additionally, I removed 1 useless instance of `GetSyntheticValue`, since pointers should always be `IndirectionSyntheticProvider`, not `DefaultSyntheticProvider`.
Pass fields to `is_tuple_fields` instead of `SBValue` object straightforward fix for a logic error. `is_tuple_fields` expects a `list`, so we pass that in instead of the value object. Coincidentally, this also fixes one of the 3 DI tests that fails on `x86_64-pc-windows-gnu` (`tests/debuginfo/union-smoke.rs`)
Rollup of 7 pull requests Successful merges: - rust-lang#155643 (Improve suggestion for $-prefixed fragment specifiers) - rust-lang#154197 (Avoid redundant clone suggestions in borrowck diagnostics) - rust-lang#154372 (Exposing Float Masks) - rust-lang#155680 (Handle index projections in call destinations in DSE) - rust-lang#155732 (bootstrap: Don't clone submodules unconditionally in dry-run) - rust-lang#155737 (Account for `GetSyntheticValue` failures) - rust-lang#155738 (Pass fields to `is_tuple_fields` instead of `SBValue` object)
Do not modify resolver outputs during lowering Split from rust-lang#142830 I believe this achieves the same thing as rust-lang#153656 but in a much simpler way. This PR forces AST->HIR lowering to stop mutating resolver outputs. Instead, it manages a few override maps that only live during lowering and are dropped afterwards. r? @petrochenkov cc @aerooneqq
privacy: Assert that compared visibilities are (usually) ordered And make "greater than" (`>`) the new primary operation for comparing visibilities instead of "is at least" (`>=`).
Fork push workflows can run in GitHub Actions with only the triggering branch fetched. In that shape refs/remotes/origin/main may be absent, and a shallow feature branch may not contain any bors-authored upstream commit. After the CI upstream detection stopped blindly trusting HEAD^1, that missing upstream case could fall through to searching HEAD and then panic when no upstream commit was found. Treat it as MissingUpstream instead, so download-rustc/download-ci-llvm if-unchanged conservatively disables CI downloads and builds locally. Add a regression test for the shallow fork-push shape without an origin/main ref.
5b50b98 to
d8bc00c
Compare
d8bc00c to
a9d110a
Compare
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.
This draft PR combines the current upstream PR carrier branches for rust-lang/rust rust-lang#155715, rust-lang#155716, and rust-lang#155717 so the CypherAir fork can validate their behavior together.
It also carries the integration-only arm64e validation workflows used to inspect that combined upstream-PR view.