Skip to content

Conversation

lnicola
Copy link
Member

@lnicola lnicola commented Sep 19, 2025

Subtree update of rust-analyzer to rust-lang/rust-analyzer@50bb3c5.

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

r? @ghost

dependabot bot and others added 30 commits August 6, 2025 17:11
Bumps [tmp](https://github.com/raszi/node-tmp) from 0.2.3 to 0.2.4.
- [Changelog](https://github.com/raszi/node-tmp/blob/master/CHANGELOG.md)
- [Commits](raszi/node-tmp@v0.2.3...v0.2.4)

---
updated-dependencies:
- dependency-name: tmp
  dependency-version: 0.2.4
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
…ast_instead_of_str

In handlers/extract_module.rs, generate ast::Module instead of String
…yarn/editors/code/tmp-0.2.4

Bump tmp from 0.2.3 to 0.2.4 in /editors/code
…qymsto

Disable error log for position clamping, its too noisy due to ease of triggering
remove duplicate field in Debug impl of ProjectWorkspace
…on_generate_by_indent_token

fix: generate function by indet token
The rustc AST allows both `for<>` binders and `?` polarity
modifiers in trait bounds, but they are parsed in a specific
order and validated for correctness:

  1. `for<>` binder is parsed first.
  2. Polarity modifiers (`?`, `!`) are parsed second.
  3. The parser validates that binders and polarity modifiers
     do not conflict:

```rust
if let Some(binder_span) = binder_span {
    match modifiers.polarity {
        BoundPolarity::Maybe(polarity_span) => {
            // Error: "for<...> binder not allowed with ? polarity"
        }
    }
}
```

This implies:

- `for<> ?Sized` → Valid syntax. Invalid semantics.
- `?for<> Sized` → Invalid syntax.

However, rust-analyzer incorrectly had special-case logic that
allowed `?for<>` as valid syntax. This fix removes that incorrect
special case, making rust-analyzer reject `?for<> Sized` as a
syntax error, matching rustc behavior.

This has caused confusion in other crates (such as syn) which
rely on these files to implement correct syntax evaluation.
**Input**:

```rust
fn main() {
    write!(f, "{2+3}$0")
}
```

**Old output**:

```rust
fn main() {
    write!("{}"$0, 2+3)
}
```

**This PR output**:

```rust
fn main() {
    write!(f, "{}"$0, 2+3)
}
```
parser: fix parsing of trait bound polarity and for-binders
…m-fmtstr-on-write

Fix extract_expressions_from_format_string on write!
This updates the rust-version file to 21a19c2.
Pull recent changes from https://github.com/rust-lang/rust via Josh.

Upstream ref: 21a19c2
Filtered ref: 9a5c1fb93028e1a29a7598ce782efb0c5d7be534

This merge was created using https://github.com/rust-lang/josh-sync.
hotfix: Update flycheck diagnostics generation
feat: Add Config Option to Exclude Locals from Document Symbol Search
@rustbot
Copy link
Collaborator

rustbot commented Sep 19, 2025

rust-analyzer is developed in its own repository. If possible, consider making this change to rust-lang/rust-analyzer instead.

cc @rust-lang/rust-analyzer

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-rust-analyzer Relevant to the rust-analyzer team, which will review and decide on the PR/issue. labels Sep 19, 2025
@rustbot
Copy link
Collaborator

rustbot commented Sep 19, 2025

⚠️ Warning ⚠️

  • There are issue links (such as #123) in the commit messages of the following commits.
    Please move them to the PR description, to avoid spamming the issues with references to the commit, and so this bot can automatically canonicalize them to avoid issues with subtree.

  • This PR is based on an upstream commit that is older than 28 days.

    It's recommended to update your branch according to the rustc-dev-guide.

@lnicola
Copy link
Member Author

lnicola commented Sep 19, 2025

@bors r+ p=1 subtree sync

@bors
Copy link
Collaborator

bors commented Sep 19, 2025

📌 Commit fefecbc has been approved by lnicola

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 Sep 19, 2025
Zalathar added a commit to Zalathar/rust that referenced this pull request Sep 19, 2025
`rust-analyzer` subtree update

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

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

r? `@ghost`
@Zalathar
Copy link
Contributor

Seems to have failed in rollup? #146760 (comment)

@bors r-

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Sep 19, 2025
@lnicola
Copy link
Member Author

lnicola commented Sep 19, 2025

Probably a conflict with #146638.

@ShoyuVanilla
Copy link
Member

Oh, so it is not failing against the current rustc HEAD but within rollup 🫠 So, are we gonna wait for the rollup to be merged, publish ra_ap_rustc_*s and then subtree update again?

@lnicola
Copy link
Member Author

lnicola commented Sep 19, 2025

Yeah, that's likely. Not sure how common it is to preempt a subtree sync in favor of another PR, but I don't want to delay the next trait solver work :-).

@ShoyuVanilla
Copy link
Member

Yeah, I'm really looking forward to seeing this land soon as well.

@ShoyuVanilla
Copy link
Member

BTW #146638 is good for rust-analyzer as well. I'm gonna check whether we could use next-solver's canonicalizer in place of our current canonicalizer in rust-analyzer code that hand-ported from rustc_infer once it is merged. (Basically we can try that with the current version but API is getting more handy a bit 😄 )

@lnicola lnicola closed this Sep 20, 2025
@lnicola lnicola deleted the sync-from-ra branch September 20, 2025 07:03
@rustbot rustbot removed the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Sep 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.