Skip to content

Rustc pull update - #2215

Open
workflows-stdarch[bot] wants to merge 104 commits into
mainfrom
rustc-pull
Open

Rustc pull update#2215
workflows-stdarch[bot] wants to merge 104 commits into
mainfrom
rustc-pull

Conversation

@workflows-stdarch

Copy link
Copy Markdown

Latest update from rustc.

The rustc-josh-sync Cronjob Bot and others added 30 commits March 30, 2026 05:09
…essages

fix: Correct missing-args messages for sched_getaffinity and getenv shims
…t-fn-body

Replace make constructor with syntaxFactory in utils/gen trait fn body
fix: complete envs in nested `env!()`
fix: postfix completions include nots prefix-expr
fix: Improve inserted order for trait_impl_redundant_assoc_item
impl Display type hint inlay hints at the end of the line #4318
feat: add expected name on simple enum variant
feat: add support for folding ranges for chained expressions
feat: offer on tail-expr with else-branch for if_let_to_guarded assist
Publish no-server to Code Marketplace and OpenVSX
fix: Fix a cycle in bounds lowering
…ys-proc

make matching brace work when cursor not at bracket
…pace-loading

fix: load rust-analyzer.toml for virtual workspaces
…gnostics

fix: Stale diagnostics when a custom check command is configured
fix: Port call expr type checking and closure upvar inference from rustc
fix: resolve comparison operators to explicit trait impls (#13332)
feat(completion): reduce relevance for deprecated items
perf: optimize allocation strategies of output/parser/event
feat: add .new postfix completion based on expected type (rust-lang/r…
feat: handle if matches!() for replace_if_let_with_match
…ath-when-prefer-prelude-false

fix: avoid prelude paths when `imports.preferPrelude` is false
fix: use Pattern_White_Space for whitespace handling
lnicola and others added 13 commits August 17, 2026 09:36
internal: Drop `zigbuild` support
fix: emit E0600 when unary `!`/`-` is applied to unsupported type
minor: skip iter excludes 'into_iter' method
perf: Optimize the heck out of the storage of token trees
perf: Push nominal obligations instead of returning them



`WfPredicates::nominal_obligations` built a per-predicate `Vec` of origins and a fully instantiated `InstantiatedPredicates` before collecting the result. Instead, this PR walks the `predicates_of` parent chain by recursion and instantiate each level directly into the result, which is allocated once with the exact size. Most items have no parent, so that case is handled in `nominal_obligations` inline, so this common path stays free of calls.
fix: Fix HIR lowering of params of trait assoc fns
fix: Push a generic params scope for consts
allow `-Ldependency` search paths for panic runtimes



Part of [build-std=always RFC](https://rust-lang.github.io/rfcs/3874-build-std-always.html). 

This PR supports `-Ldependency=` search paths for panic runtimes.  This will allow Cargo to treat panic runtimes as regular transitive dependencies, rather than special-casing them.

To do so:
1. During panic runtime injection we remove the early‑return `only_rlib` check. As a result the panic runtime is injected as a conditional dependency when building `std` and is subsequently included in `std`'s metadata. When building a crate that uses `std`, the panic runtime is resolved through `resolve_crate_deps` in the same way as any other transitive dependency. </br>
For a prebuilt `std` (unlike `build-std`), the `-Cpanic=` option passed to `std` may differ from that passed to its dependents, so we might still need to inject another panic runtime as a direct dependency. However, this is not important in the context of prebuilt std.
2. `NoPanicStrategy` is checked only for `panic_abort`. We can compile `panic_unwind` with `-Cpanic=abort` for some targets. This was previously overlooked.

#### Summary of the history and discussions in this PR

1. In the first iteration of this PR `PathKind` for injected dependencies was simply changed from `-Lcrate=` to `-Ldependency`, but this raised a [concern](rust-lang/rust#160007 (comment)). Bjorn3 [suggested](rust-lang/rust#160007 (comment)) to include both panic runtimes  as a dependency of `std` so we don't have to inject it as a dependency for any user of `std`. The correct one should then be activated later in `dependency_format.rs`.
2. In the second iteration Bjorn3's suggestion was implemented. The problem was that for `build-std=always`, we might want to avoid building `panic_unwind` when not necessary. From the compiler perspective we need to </br>
2.1. Either always resolve `panic_unwind` and ignore any resulting error. (might lead to bugs)
2.2. Or conditionally resolve  `panic_unwind`.  For `build-std` we might rely on `-Cpanic=` option for this in accordance with [panic strategies](https://rust-lang.github.io/rfcs/3874-build-std-always.html#panic-strategies) but for prebuilt  `std` this will fail for some targets. </br>
It was decided to relax the implementation so we can inject panic runtime as direct dependency for prebuilt `std`. 
3. Third iteration: we are here

cc @adamgemmell
This makes it clear that it is only meant for LLVM intrinsics and not
for defining or calling arbitrary user functions.
Rename extern "unadjusted" to extern "llvm-intrinsic"

This makes it clear that it is only meant for LLVM intrinsics and not for defining or calling arbitrary user functions.

Follow up to rust-lang/rust#160077
…kang

Refactor the `#[allow(dead_code)]` propagation for impl items of traits



Extracted from rust-lang/rust#157885.

This PR does the refactor and corrects the previous implementation.

The following will fail currently ([play](https://play.rust-lang.org/?version=nightly&mode=debug&edition=2024&gist=3279902b2d2e6b0fe75c5af565b1cddd)):
```rust
#![deny(dead_code)]
#![deny(unfulfilled_lint_expectations)]

#[allow(dead_code)]
pub trait Tr {
    fn foo(&self);
}

struct Foo;

impl Tr for Foo {
    fn foo(&self) {
        bar();
    }
}

#[expect(dead_code)]
fn bar() {}

fn main() {}
```

After this PR, we could handle the `#[allow(dead_code)]` propagation correctly, and should get perf improvement.
Consolidate LLVM skip in check builds in bootstrap

Before it was distributed amongst two places, which made it harder to follow the logic, and the `RUST_CHECK` logic was also applied for *anything* being built, even though it is only relevant for rustc itself. This PR centralizes the handling, and also enables it for `doc` builds.

So `./x doc compiler` now doesn't require building LLVM 🎉

r? jieyouxu
@rustbot

rustbot commented Aug 31, 2026

Copy link
Copy Markdown
Collaborator

Thanks for the pull request, and welcome! The Rust Project has assigned @sayantn (or someone else) to review your changes, you should hear from them (or someone else) within the next two weeks.

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: @Amanieu, @adamgemmell, @davidtwco, @folkertdev, @sayantn
  • @Amanieu, @adamgemmell, @davidtwco, @folkertdev, @sayantn expanded to Amanieu, adamgemmell, davidtwco, folkertdev, sayantn
  • Random selection from Amanieu, adamgemmell, davidtwco, folkertdev, sayantn

`rust-analyzer` subtree update

Subtree update of `rust-analyzer` to rust-lang/rust-analyzer@f899669.

Created using https://github.com/rust-lang/josh-sync.

r? @ghost
bors and others added 4 commits September 5, 2026 20:19
mir-transform: Treat `optimize(none)` the same as `opt-level=0`



cc @RalfJung
Use query for Variant InhabitedPredicate



It looks like there may be some benefit from caching.
This updates the rust-version file to 32d94cc9be3f6e6c3fa1deaea9e0ab93c4980dba.
@adamgemmell

Copy link
Copy Markdown
Contributor

r? @folkertdev

This PR fixes CI, and I made some manual fixes to the end of the branch

@rustbot rustbot assigned folkertdev and unassigned sayantn Sep 8, 2026
@folkertdev

Copy link
Copy Markdown
Contributor

I am at RustConf so it's hard to review this. Are the final two commits the only interesting changes? Any idea why that instruction assertion needs changing?

@adamgemmell

adamgemmell commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Yes the last two commits are the only interesting changes, everything before is from the workflow.

A heavily LLM-led investigation suggests it might be because of your rust-lang/rust#161394 patch. If this is too heavy then feel free to leave it until next week.

Here's the previous disassembly and the new one:

0008c030 <stdarch_test_shim_vzipq_u32_vorr>:
   8c030:       eef00b40        vmov.f64        d16, d0
   8c034:       f2621112        vorr    d17, d2, d2
   8c038:       f2212111        vorr    d2, d1, d1
   8c03c:       f440089d        vst2.32 {d16-d17}, [r0 :64]!
   8c040:       f400289f        vst2.32 {d2-d3}, [r0 :64]
   8c044:       e12fff1e        bx      lr
00088be0 <stdarch_test_shim_vzipq_u32_vzip>:
   88be0:       f3ba01c2        vzip.32 q0, q1
   88be4:       e12fff1e        bx      lr

It looks like your patch would allow the vector tuples returned by the vzipq to be returned in vector registers rather than passed on the stack. When returning on the stack LLVM used 2 vst2 to perform the interleaving, while when returning in registers it uses the intended vzip instruction. vorr is present just to move values into different registers. Does that make sense to you? Either way, the change seems desired.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.