Commit graph

312289 commits

Author SHA1 Message Date
Shoyu Vanilla (Flint)
72d41e19d3
Merge pull request #21209 from ChayimFriedman2/stale-expr
internal: Do not create stale expressions in body lowering
2025-12-08 16:28:46 +00:00
Shoyu Vanilla (Flint)
d1c784328d
Merge pull request #21207 from rust-lang/dependabot/npm_and_yarn/editors/code/multi-d0f6e8601e
Bump jws in /editors/code
2025-12-08 16:18:41 +00:00
Shoyu Vanilla (Flint)
c6b3ec5a5f
Merge pull request #21221 from A4-Tacks/no-pub-in-variant-field
Fix pub in enum variant field for no_such_field
2025-12-08 07:18:53 +00:00
Shoyu Vanilla (Flint)
2bfbba3b84
Merge pull request #21174 from Young-Flash/migrate_convert_iter_for_each_to_for
internal: migrate `convert_iter_for_each_to_for` to SyntaxEditor api
2025-12-08 07:11:26 +00:00
Shoyu Vanilla (Flint)
79be9f1174
Merge pull request #21199 from Young-Flash/migrate_generate_delegate_trait
internal: migrate `generate_delegate_trait` to SyntaxEditor api
2025-12-08 07:10:19 +00:00
Lukas Wirth
632acd7247
Merge pull request #21222 from A4-Tacks/no-comp-resugar-unit-ret-ty
No complete unit RetType in resugar async assoc item
2025-12-07 15:06:49 +00:00
Lukas Wirth
ff8193c2cc
Merge pull request #21223 from Veykril/push-xpmrpxnwpono
fix: Disable postcard use temporarily
2025-12-07 14:02:19 +00:00
Lukas Wirth
34c61d1a72 fix: Disable postcard use temporarily 2025-12-07 14:52:10 +01:00
A4-Tacks
89a8142571
No complete unit RetType in resugar async assoc item
Example
---
```rust
use core::future::Future;

trait DesugaredAsyncTrait {
    fn foo(&self) -> impl Future<Output = ()> + Send;
}

impl DesugaredAsyncTrait for () {
    $0
}
```

**Before this PR**

```rust
use core::future::Future;

trait DesugaredAsyncTrait {
    fn foo(&self) -> impl Future<Output = ()> + Send;
}

impl DesugaredAsyncTrait for () {
    async fn foo(&self) -> () {
        $0
    }
}
```

**After this PR**

```rust
use core::future::Future;

trait DesugaredAsyncTrait {
    fn foo(&self) -> impl Future<Output = ()> + Send;
}

impl DesugaredAsyncTrait for () {
    async fn foo(&self) {
        $0
    }
}
```
2025-12-07 21:18:40 +08:00
A4-Tacks
3e33ed8fbb
Fix pub in enum variant field for no_such_field
Example
---
```rust
//- /main.rs
mod foo;

fn main() {
    foo::Foo::Variant { bar: 3, $0baz: false};
}
//- /foo.rs
pub enum Foo {
    Variant {
        bar: i32
    }
}
```

**Before this PR**

```rust
pub enum Foo {
    Variant {
        bar: i32,
        pub(crate) baz: bool
    }
}
```

**After this PR**

```rust
pub enum Foo {
    Variant {
        bar: i32,
        baz: bool
    }
}
```
2025-12-07 20:49:22 +08:00
Lukas Wirth
9f9c9c3845
Merge pull request #21178 from Veykril/tracked-modules
internal: Make `ModuleId` a tracked struct
2025-12-07 08:41:04 +00:00
Lukas Wirth
a1a9514f6f Turn BlockLoc into a tracked struct 2025-12-07 09:31:53 +01:00
Lukas Wirth
7766ee6869 Make ModuleId a tracked struct
optimize some stuff

Optimize `pub(crate)` visibility resolution

Optimize private visibility resolution
2025-12-07 09:31:19 +01:00
Lukas Wirth
ed043f4813
Merge pull request #21215 from ChayimFriedman2/unsized-struct
fix: Don't implement sizedness check via `all_field_tys()`
2025-12-07 08:30:54 +00:00
Chayim Refael Friedman
aafe60d12f
Merge pull request #21218 from ChayimFriedman2/update-supported-version
internal: Update supported Rust version to 1.90.0
2025-12-07 00:24:54 +00:00
Chayim Refael Friedman
e9d18d5b60 Update supported Rust version to 1.90.0
We no longer work properly with older versions.
2025-12-07 02:14:39 +02:00
Chayim Refael Friedman
74734878c8 Don't implement sizedness check via all_field_tys()
Since we don't implement it currently for perf reasons, but here we only need a struct's tail field, it will be wrong.
2025-12-06 21:23:21 +02:00
Young-Flash
1b396d7b7b minor: add missing SyntaxFactory::assoc_item_list 2025-12-05 20:27:30 +08:00
Chayim Refael Friedman
e2d9d4981e Do not create stale expressions in body lowering 2025-12-05 12:53:10 +02:00
Lukas Wirth
15e0532466
Merge pull request #21208 from ChayimFriedman2/lint-attrs-hir
internal: Handle lint attributes via hir-expand attr handling
2025-12-05 09:12:21 +00:00
Chayim Refael Friedman
1769b0b680 Handle lint attributes via hir-expand attr handling
This avoids code duplication.
2025-12-05 07:04:18 +02:00
Chayim Refael Friedman
8dd571eb68
Merge pull request #21203 from A4-Tacks/hide-placeholder-hints
Add config hide placeholders type hints
2025-12-04 21:57:01 +00:00
Chayim Refael Friedman
240bd2810c
Merge pull request #21205 from eihqnh/fix/cfg-attr-index-mismatch
fix: Skip cfg attributes in macro input attribute stripping
2025-12-04 19:58:03 +00:00
eihqnh
013250c571 fix: Skip cfg attributes when stripping macro input attributes 2025-12-05 03:42:39 +08:00
A4-Tacks
130d4b0ab6
Add config hide placeholders type hints
In the inferred type hints, expand the line too long. add config to disable it.

Example
---
```json
{"rust-analyzer.inlayHints.typeHints.hideInferredTypes": true}
```

```rust
use std::collections::HashMap;
fn foo(iter: Vec<Result<HashMap<String, String>, std::io::Error>>) {
    let output = iter.into_iter().collect::<Result<Vec<_>, _>>().unwrap();
}
```

**Before this PR**

```rust
let output: Vec<HashMap<String, String>> = iter.into_iter().collect::<Result<Vec<_ = HashMap<String, String>>, _ = Error>>().unwrap();
```

**After this PR**

```rust
let output: Vec<HashMap<String, String>> = iter.into_iter().collect::<Result<Vec<_>, _>>().unwrap();
```
2025-12-05 02:09:59 +08:00
dependabot[bot]
573d6a5b9b
Bump jws in /editors/code
Bumps  and [jws](https://github.com/brianloveswords/node-jws). These dependencies needed to be updated together.

Updates `jws` from 3.2.2 to 3.2.3
- [Release notes](https://github.com/brianloveswords/node-jws/releases)
- [Changelog](https://github.com/auth0/node-jws/blob/master/CHANGELOG.md)
- [Commits](https://github.com/brianloveswords/node-jws/compare/v3.2.2...v3.2.3)

Updates `jws` from 4.0.0 to 4.0.1
- [Release notes](https://github.com/brianloveswords/node-jws/releases)
- [Changelog](https://github.com/auth0/node-jws/blob/master/CHANGELOG.md)
- [Commits](https://github.com/brianloveswords/node-jws/compare/v3.2.2...v3.2.3)

---
updated-dependencies:
- dependency-name: jws
  dependency-version: 3.2.3
  dependency-type: indirect
- dependency-name: jws
  dependency-version: 4.0.1
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-04 16:56:52 +00:00
Young-Flash
b405964c94 minor: fmt & clippy 2025-12-04 23:30:01 +08:00
Young-Flash
98d0421a71 internal: migrate generate_delegate_trait to SyntaxEditor api 2025-12-04 23:27:19 +08:00
Lukas Wirth
2d36bea1e1
Merge pull request #21183 from ChayimFriedman2/define-opaque
fix: Register `define_opaque` builtin attribute macro
2025-12-04 07:57:54 +00:00
Lukas Wirth
0e706a5c79
Merge pull request #21195 from Veykril/push-nnzprznzurwz
fix: More proc-macro-srv proto fixes
2025-12-03 16:15:37 +00:00
Lukas Wirth
0c605dd416 fix: More proc-macro-srv proto fixes 2025-12-03 16:17:51 +01:00
Chayim Refael Friedman
0b59d4867b
Merge pull request #21198 from A4-Tacks/nested-incomplete-let-semi
Fix nested expr missing semicolon in incomplete-let
2025-12-03 11:16:26 +00:00
A4-Tacks
481910002d
Fix nested expr missing semicolon in incomplete-let
Example
---
```rust
fn main() {
    let x = &$0
}
```

**Before this PR**

```rust
fn main() {
    let x = &loop {
        $0
    }
}
```

**After this PR**

```rust
fn main() {
    let x = &loop {
        $0
    };
}
```
2025-12-03 19:06:03 +08:00
Chayim Refael Friedman
4503a7c58f
Merge pull request #21197 from ChayimFriedman2/result-alias-display
minor: Introduce a type alias for `HirDisplay`'s `Result`
2025-12-03 10:22:17 +00:00
Chayim Refael Friedman
f523e953f1 Introduce a type alias for HirDisplay's Result
Simplify the code a bit.
2025-12-03 12:12:54 +02:00
Lukas Wirth
95cee9cccf
Merge pull request #21164 from Wilfred/multiple_discover_requests
fix: Allow multiple discover operations
2025-12-03 08:51:11 +00:00
Lukas Wirth
1e3fbf9183
Merge pull request #21188 from Wilfred/fix_rustdoc_and_add_ci
Fix rustdoc warnings and add CI
2025-12-03 08:51:04 +00:00
Laurențiu Nicola
329395e55c
Merge pull request #21157 from Wilfred/task_queue_naming
minor: Use 'deferred task' terminology consistently
2025-12-02 19:35:25 +00:00
Laurențiu Nicola
aa0176a9ed
Merge pull request #21189 from Wilfred/mdbook_toc_simplify
internal: Remove mdbook-toc usage
2025-12-02 07:57:01 +00:00
Laurențiu Nicola
56431c4da3
Merge pull request #21191 from chuck-sys/fix/spelling
fix(spelling): underling -> underlying
2025-12-02 07:32:29 +00:00
Cheuk Yin Ng
1099da1877
fix(spelling): underling -> underlying 2025-12-01 23:21:18 -08:00
Chayim Refael Friedman
bff5839a49
Merge pull request #21182 from ChayimFriedman2/param-env
internal: Remove `TraitEnvironment`
2025-12-02 02:53:34 +00:00
Lukas Wirth
d9beb0aa58
Merge pull request #21190 from Veykril/push-puqrkvrtqxnz
fix: Fix proc-macro-srv passing invalid extra none group to proc-macros
2025-12-01 15:38:00 +00:00
Lukas Wirth
c435a5f17f fix: Fix proc-macro-srv passing invalid extra none group to proc-macros 2025-12-01 16:28:18 +01:00
Wilfred Hughes
640a0346ce Remove mdbook-toc usage
Now that there's a table of contents rendered in the left sidebar,
there doesn't seem to be much value in rendering a table of contents
on the page too.

The sidebar TOC was added in mdbook 0.5:
https://github.com/rust-lang/mdBook/blob/master/CHANGELOG.md#05-migration-guide
2025-12-01 14:27:20 +00:00
Young-Flash
7fa80495ea internal: add missing method for SyntaxFactory 2025-12-01 22:05:24 +08:00
Wilfred Hughes
39cd4a1da1 fix: Allow multiple discover operations
Previously, rust-analyzer would drop discover requests that arrived
before we'd finished processing the previous request.

Fix this by allowing multiple discover requests to be active. Keep
track of the number of discover operations for the quiescence check,
and keep the process handles until they terminate.
2025-12-01 13:17:05 +00:00
Wilfred Hughes
5c93137d2f Fix rustdoc warnings and add CI
rustdoc has a separate environment variable for banning warnings, so
set that in the GitHub action configuration.

https://github.com/rust-lang/cargo/issues/8424#issuecomment-1070988443

Fix all the rustdoc warnings on unknown types or functions. I've
updated references wherever it's obvious, otherwise I've replaced the
rustdoc link with plain backticks.

There were also some cases where rustdoc links referred to private
APIs. I've disabled the rustdoc private API warning in those crates.
2025-12-01 13:06:15 +00:00
Wilfred Hughes
61712e71ae Use 'deferred task' terminology consistently 2025-12-01 11:18:18 +00:00
Laurențiu Nicola
ad61e76c58
Merge pull request #21186 from lnicola/exactly-one
minor: Use `Itertools::exactly_one` in a couple more places
2025-12-01 11:03:31 +00:00