Skip to content

Conversation

@matthiaskrgr
Copy link
Member

@matthiaskrgr matthiaskrgr commented Nov 4, 2025

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

fneddy and others added 30 commits October 21, 2025 08:30
The tests fail on s390x and presumably other big-endian systems, due
to check of raw alloc values in the MIR output.

To fix the tests remove the raw bytes from the MIR output
(via: compile-flags: -Zdump-mir-exclude-alloc-bytes) and update the
matching diffs.
Example
---
```rust
fn main() {
    let mut x = Some(1);
    while x.is_som$0e() { x = None }
}
```

**Before this PR**

Assist not applicable

**After this PR**

```rust
fn main() {
    let mut x = Some(1);
    while let Some(${0:x1}) = x { x = None }
}
```
By letting the solver take control of them (reveal them when needed and define them when needed), by providing them in the `TypingMode` plus few helpers.
feat: When renaming `self` to other name, change callers method method call syntax to assoc fn syntax
…y-flyimport

fix: Consider all matches for flyimport even when searched with a qualifier
…n-ns2

Avoid calling `specializes()` query on crates that do not define `#![feature(specialization)]`
…ozkq

perf: Reduce `client_commands` allocations in proto conversion
…tations" or "Implementations" codelens

I don't do it by default, for three reasons: (1) it's more expensive, (2) I actually quite like seeing the derives, and they may expand to no impl/more than one impl, (3) if rust-lang#19130 will ever be merged this will become even more useful.

Even a config might be too much, but it was fun and easy to code so I did that.
…derive

feat: Provide an option to not show derives near the ADT for "Goto Implementations" or "Implementations" codelens
…-let

Fix not applicable on while for replace_is_method_with_if_let_method
Unfortunately, this requires a custom build of r-a, and it's quite slow.
…lock

fix: Fix handling of blocks modules that are not the root module
Co-authored-by: Lukas Wirth <lukas@zed.dev>
Show proper async function signatures in the signature help
…ntpo

fix: Improve error recovery when parsing malformed function return types
minor: Cleanup `map_rust_child_diagnostics` a bit
fix: Do not make false positive syntax errors on frontmatter
Fix typos, backtick errors/omissions
estebank and others added 21 commits November 3, 2025 02:23
This updates the rust-version file to c5dabe8.
Pull recent changes from https://github.com/rust-lang/rust via Josh.

Upstream ref: c5dabe8
Filtered ref: 3214048a4d271548c85aae8ffc5f28ec73719235
Upstream diff: rust-lang/rust@fb24b04...c5dabe8

This merge was created using https://github.com/rust-lang/josh-sync.
Fix missing other assoc items for generate_blanket_trait_impl
When completing some expressions, it is almost always expected to have a non unit value

- ArrayExpr
- ParenExpr
- BreakExpr
- ReturnExpr
- PrefixExpr
- FormatArgsArg
- RecordExprField
- BinExpr (rhs only)
- IndexExpr (inside index only)

Example
---
```rust
fn main() {
    return $0;
}
```

**Before this PR**

```rust
fn main() {
    return if $1 {
        $0
    };
}
```

**After this PR**

```rust
fn main() {
    return if $1 {
        $2
    } else {
        $0
    };
}
```
fix: Canonicalize `custom-target.json` paths when fetching sysroot metadata
fix: Expand literals with wrong suffixes into `LitKind::Err`
Convert for each range into while loop.

```rust
fn foo() {
    $0for i in 3..7 {
        foo(i);
    }
}
```
->
```rust
fn foo() {
    let mut i = 3;
    while i < 7 {
        foo(i);
        i += 1;
    }
}
```
…eril

Tweak output of missing lifetime on associated type

Follow up to rust-lang#135602.

Previously we only showed the trait's assoc item if the trait was local, because we were looking for a small span only for the generics, which we don't have for foreign traits. We now use `def_span` for the item, so we at least provide some context, even if its span is too wide.

```
error[E0195]: lifetime parameters or bounds on type `IntoIter` do not match the trait declaration
   --> tests/ui/lifetimes/missing-lifetime-in-assoc-type-4.rs:7:18
    |
7   |     type IntoIter<'a> = std::collections::btree_map::Values<'a, i32, T>;
    |                  ^^^^ lifetimes do not match type in trait
    |
   ::: /home/gh-estebank/rust/library/core/src/iter/traits/collect.rs:292:5
    |
292 |     type IntoIter: Iterator<Item = Self::Item>;
    |     ------------------------------------------ lifetimes in impl do not match this type in trait
```

Given an associated item that needs a named lifetime, look at the enclosing `impl` item for one. If there is none, look at the self type and the implemented trait to see if either of those has an anonimous lifetime. If so, suggest adding a named lifetime.

```
error: in the trait associated type is declared without lifetime parameters, so using a borrowed type for them requires that lifetime to come from the implemented type
  --> $DIR/missing-lifetime-in-assoc-type-2.rs:5:17
   |
LL |     type Item = &T;
   |                 ^ this lifetime must come from the implemented type
   |
help: add a lifetime to the impl block and use it in the self type and associated type
   |
LL ~ impl<'a> IntoIterator for &'a S {
LL ~     type Item = &'a T;
   |
```

Move the previous long message to a note and use a shorter primary message:

```
error: missing lifetime in associated type
  --> $DIR/missing-lifetime-in-assoc-type-1.rs:9:17
   |
LL | impl<'a> IntoIterator for &S {
   |     ---- there is a named lifetime specified on the impl block you could use
...
LL |     type Item = &T;
   |                 ^ this lifetime must come from the implemented type
   |
note: in the trait the associated type is declared without lifetime parameters, so using a borrowed type for them requires that lifetime to come from the implemented type
  --> $SRC_DIR/core/src/iter/traits/collect.rs:LL:COL
help: consider using the lifetime from the impl block
   |
LL |     type Item = &'a T;
   |                  ++
```

r? ``@Nadrieril``
…=saethlin

Fix tests for big-endian

The tests fail on s390x and presumably other big-endian systems, due to check of raw alloc values in the MIR output.

To fix the tests remove the raw bytes from the MIR output (via: compile-flags: -Zdump-mir-exclude-alloc-bytes) and update the matching diffs.
compiler: Fix a couple issues around cargo feature unification

cc rust-lang#148266. this doesn't fix all the issues (`rustc_public` and `rustc_transmute` still emit warnings when tested individually), but it fixes all the simple ones.

To fix rustc_public I will probably need help from `@AlexanderPortland` or `@makai410` to make sure I am not accidentally cfg-ing out items that are meant to be public. To fix `rustc_transmute`, I will need to know (from `@jswrenn` ?) in what context the `rustc` cargo feature is disapled. To reproduce the issues, you can run `x test rustc_{transmute,public}` locally.

---

The first issue I fixed was a warning in `rustc_index`:
```
Testing stage2 {rustc_parse_format} (aarch64-apple-darwin)
   Compiling rustc_index v0.0.0 (/Users/ci/project/compiler/rustc_index)
error: extern crate `smallvec` is unused in crate `rustc_index`
 --> compiler/rustc_index/src/lib.rs:2:1
  |
2 | #![cfg_attr(all(feature = "nightly", test), feature(stmt_expr_attributes))]
  | ^
  |
  = help: remove the dependency or add `use smallvec as _;` to the crate root
  = note: `-D unused-crate-dependencies` implied by `-D warnings`
  = help: to override `-D warnings` add `#[allow(unused_crate_dependencies)]`

error: could not compile `rustc_index` (lib) due to 1 previous error
```

The second was that `type_ir_macros` didn't fully specify its dependencies:
```
Testing stage1 {rustc_type_ir_macros} (aarch64-apple-darwin)
   Compiling rustc_type_ir_macros v0.0.0 (/Users/jyn/src/ferrocene3/compiler/rustc_type_ir_macros)
error[E0432]: unresolved import `syn::visit_mut`
   --> compiler/rustc_type_ir_macros/src/lib.rs:2:10
    |
  2 | use syn::visit_mut::VisitMut;
    |          ^^^^^^^^^ could not find `visit_mut` in `syn`
    |
note: found an item that was configured out
   --> /Users/jyn/.local/lib/cargo/registry/src/index.crates.io-1949cf8c6b5b557f/syn-2.0.106/src/lib.rs:880:21
    |
878 | #[cfg(feature = "visit-mut")]
    |       --------------------- the item is gated behind the `visit-mut` feature
879 | #[cfg_attr(docsrs, doc(cfg(feature = "visit-mut")))]
880 | pub use crate::gen::visit_mut;
    |                     ^^^^^^^^^

error[E0433]: failed to resolve: could not find `visit_mut` in `syn`
   --> compiler/rustc_type_ir_macros/src/lib.rs:206:18
    |
206 |             syn::visit_mut::visit_type_path_mut(self, i);
    |                  ^^^^^^^^^ could not find `visit_mut` in `syn`
    |
note: found an item that was configured out
   --> /Users/jyn/.local/lib/cargo/registry/src/index.crates.io-1949cf8c6b5b557f/syn-2.0.106/src/lib.rs:880:21
    |
878 | #[cfg(feature = "visit-mut")]
    |       --------------------- the item is gated behind the `visit-mut` feature
879 | #[cfg_attr(docsrs, doc(cfg(feature = "visit-mut")))]
880 | pub use crate::gen::visit_mut;
    |                     ^^^^^^^^^
```
`rust-analyzer` subtree update

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

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

r? ``@ghost``
@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-rust-analyzer Relevant to the rust-analyzer team, which will review and decide on the PR/issue. rollup A PR which is a rollup labels Nov 4, 2025
@matthiaskrgr
Copy link
Member Author

@bors r+ rollup=never p=5

@bors
Copy link
Collaborator

bors commented Nov 4, 2025

📌 Commit 3615a26 has been approved by matthiaskrgr

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 Nov 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-rust-analyzer Relevant to the rust-analyzer team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.