Commit graph

314184 commits

Author SHA1 Message Date
benodiwal
0451cc012a
fix: add location links for generic type parameters in inlay hints 2026-01-03 00:52:19 +05:30
Lukas Wirth
0598fc6638
Merge pull request #21388 from Veykril/push-uyrsywszqotk
Remove unnecessary `ConstLiteralRef` enum
2026-01-02 12:30:33 +00:00
Lukas Wirth
94ed628bc2
Merge pull request #21390 from Veykril/push-xkollqttmmrq
Pre-allocate intern storages with 64kb of data / 1024 elements
2026-01-02 12:29:19 +00:00
Lukas Wirth
f841758cf5 Remove unnecessary ConstLiteralRef enum 2026-01-02 13:21:53 +01:00
Lukas Wirth
cd7a58e412 Pre-allocate intern storages with 64kb of data
To reduce the amount of re-allocating the hashtables which can be expensive given the need to re-hash
2026-01-02 13:20:06 +01:00
Lukas Wirth
854f1f8db1
Merge pull request #21387 from Veykril/push-slxpzqlrpuxt
minor: Fix some minor FIXMEs
2026-01-02 09:27:58 +00:00
Lukas Wirth
4b34f4f4fb minor: Fix some minor FIXMEs 2026-01-02 10:19:02 +01:00
Shoyu Vanilla (Flint)
644eff67f6
Merge pull request #21383 from rust-lang/dependabot/npm_and_yarn/editors/code/qs-6.14.1
Bump qs from 6.14.0 to 6.14.1 in /editors/code
2026-01-02 02:17:43 +00:00
Shoyu Vanilla (Flint)
e34c26580f
Merge pull request #21361 from A4-Tacks/sugg-name-prefix-try-into
Add useless prefix `try_into_` for suggest_name
2026-01-02 02:16:10 +00:00
dependabot[bot]
cde301fabc
Bump qs from 6.14.0 to 6.14.1 in /editors/code
Bumps [qs](https://github.com/ljharb/qs) from 6.14.0 to 6.14.1.
- [Changelog](https://github.com/ljharb/qs/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ljharb/qs/compare/v6.14.0...v6.14.1)

---
updated-dependencies:
- dependency-name: qs
  dependency-version: 6.14.1
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-01-01 19:20:42 +00:00
Lukas Wirth
019d0164da
Merge pull request #21376 from SomeoneToIgnore/doc-find-defs
Allow finding references from doc comments
2025-12-31 14:30:10 +00:00
Kirill Bulatov
ec7db072ee Allow finding references from doc comments 2025-12-31 12:59:59 +02:00
Chayim Refael Friedman
6d0f23cbdc
Merge pull request #21375 from A4-Tacks/impl-trait-target-and-dyn-hint
Fix incorrect dyn hint in `impl Trait for`
2025-12-31 08:30:52 +00:00
A4-Tacks
c19e9ecdd9
Fix incorrect dyn hint in impl Trait for
Example
---
```rust
trait T {}
impl T for {}
```

**Before this PR**

```rust
trait T {}
impl T for {}
  // ^ dyn
```

**After this PR**

```rust
trait T {}
impl T for {}
```
2025-12-31 16:18:33 +08:00
Lukas Wirth
5bb8d5d1e3
Merge pull request #21370 from ChayimFriedman2/macro-brace-style
feat: Add #[rust_analyzer::macro_style()] attribute to control macro completion brace style
2025-12-31 07:39:54 +00:00
Chayim Refael Friedman
a5e6198e70
Merge pull request #21374 from Jefffrey/excuse-non-camel-case-repr-c
fix: don't fire `non_camel_case_types` lint for structs/enums marked with `repr(C)`
2025-12-31 06:43:17 +00:00
Jefffrey
935e3cbb86 fix: don't fire non_camel_case_types lint for structs/enums marked with repr(C) 2025-12-31 15:29:51 +09:00
Chayim Refael Friedman
df998811ce Adapt macros in rust-analyzer to new attribute
`match_ast!` cannot be ported because of a weird compiler bug: https://github.com/rust-lang/rust/issues/150518.
2025-12-30 22:44:23 +02:00
Chayim Refael Friedman
975aa0dc8a Add #[rust_analyzer::macro_style()] attribute to control macro completion brace style 2025-12-30 22:44:18 +02:00
Chayim Refael Friedman
c24dff6682
Merge pull request #21363 from ChayimFriedman2/compress-spans-real
perf: Compress token trees for best memory usage
2025-12-30 11:07:12 +00:00
Chayim Refael Friedman
9508cd1cb7 Compress token trees for best memory usage 2025-12-30 12:56:56 +02:00
Lukas Wirth
3d9856d950
Merge pull request #21367 from ChayimFriedman2/upvars
fix: Have an `upvars_mentioned()` query that only computes what upvars a closure captures
2025-12-30 09:00:13 +00:00
Chayim Refael Friedman
edae1517f8
Merge pull request #21308 from dfireBird/runnable-subcommand-config
feat: implement configuration to change sub command for test, bench and doctest
2025-12-29 17:20:29 +00:00
Chayim Refael Friedman
192bbd1d4b Have an upvars_mentioned() query that only computes what upvars a closure captures
It's required for coercion, where we now use it, as well as for other things.
2025-12-29 19:16:07 +02:00
Chayim Refael Friedman
9cb0713957
Merge pull request #21366 from ChayimFriedman2/fix-clippy
minor: Fix Clippy
2025-12-29 17:07:11 +00:00
dfireBird
7069629ee9 chore: add test_name placeholder in config 2025-12-29 22:32:20 +05:30
Chayim Refael Friedman
cd2c209a1c Fix Clippy 2025-12-29 18:58:25 +02:00
dfireBird
bb4d75f123 fix clippy errors 2025-12-29 20:25:25 +05:30
dfireBird
b0ff5733bb feat: implement configuration to change subcommand for test and bench 2025-12-29 20:09:47 +05:30
Lukas Wirth
00f80b4355
Merge pull request #21362 from ChayimFriedman2/compress-spans-v2
internal: Preparations for span compression
2025-12-29 08:30:19 +00:00
Chayim Refael Friedman
175e297e58 Make tt::Literal use one Symbol for the text and the suffix
That shrinks it, which is useless now (it's not the dominant factor), but will become important when we'll implement span compression.
2025-12-29 05:05:47 +02:00
Chayim Refael Friedman
49b6f677a5 Separate the public tt API from how they're stored
And don't provide any insight into the actual storage (no references, no "cheat" methods like `flat_tokens()`), as we're going to rewrite it to be more memory efficient.
2025-12-29 04:14:12 +02:00
A4-Tacks
c516c28475
Add useless prefix try_into_ for suggest_name
Example
---
```rust
enum Foo {
    Num(i32)
}

impl Foo {
    fn try_into_num(self) -> Result<i32, Self> {
        if let Self::Num(v) = self {
            Ok(v)
        } else {
            Err(self)
        }
    }
}
fn handle(foo: Foo) {
    foo.try_into_num().$0
}
```

**Before this PR**

```rust
fn handle(foo: Foo) {
    if let Ok(${1:try_into_num}) = foo.try_into_num() {
        $0
    }
}
```

**After this PR**

```rust
fn handle(foo: Foo) {
    if let Ok(${1:num}) = foo.try_into_num() {
        $0
    }
}
```
2025-12-29 06:45:17 +08:00
Lukas Wirth
75fa8a0ab9
Merge pull request #21359 from Veykril/push-syvnrvtmlsqk
Prompt the user in VSCode to add the rust-anaylzer componenet to the toolchain file
2025-12-28 13:30:43 +00:00
Lukas Wirth
4ae28483e9 Prompt the user in VSCode to add the rust-anaylzer componenet to the toolchain file 2025-12-28 14:20:35 +01:00
Lukas Wirth
9a9324347e
Merge pull request #21354 from A4-Tacks/dedup-record-update
Fix duplicate record functional update
2025-12-28 13:13:04 +00:00
Lukas Wirth
138034f0f4
Merge pull request #21358 from Veykril/push-sxkppmzqvurw
fix: Fix hover for infer type not working
2025-12-28 13:03:51 +00:00
Lukas Wirth
31fb833167 fix: Fix hover for infer type not working 2025-12-28 13:55:52 +01:00
Lukas Wirth
4fba51da4c
Merge pull request #21356 from Veykril/push-oumpxzuwmuwp
internal: Collect garbage after events when quiescient
2025-12-28 12:34:35 +00:00
Lukas Wirth
8235c351a3 Do not unnecessarily re-trigger garbage collection if no inputs have changed 2025-12-28 13:26:07 +01:00
Lukas Wirth
6f551be44b Reduce allocations in GarbageCollector 2025-12-28 13:14:06 +01:00
Lukas Wirth
1ea45e078f
Merge pull request #21357 from Veykril/push-rsulypnywlsv
Drop AstIdMap asynchronously
2025-12-28 12:01:36 +00:00
Lukas Wirth
ecb0c4cbfc internal: Collect garbage after events when quiescient 2025-12-28 12:58:04 +01:00
Lukas Wirth
11df3a0dec Drop AstIdMap asynchronously 2025-12-28 12:51:53 +01:00
Lukas Wirth
72b409d28b
Merge pull request #21355 from Veykril/push-zkmupnykkvln
perf: Reduce channel lock contention for drop-threads
2025-12-28 10:57:22 +00:00
Lukas Wirth
5adad1a8ad perf: Reduce channel lock contention for drop-threads 2025-12-28 11:43:08 +01:00
Lukas Wirth
f574941677
Merge pull request #21353 from Veykril/push-wquzszzrzwpu
perf: Pre-allocate some buffers in parsing
2025-12-28 10:27:33 +00:00
Lukas Wirth
b717c74823 perf: Pre-allocate some buffers in parsing 2025-12-28 11:18:43 +01:00
A4-Tacks
1ce1faec24
Fix duplicate record functional update
Example
---
```rust
fn main() {
    let thing = 1;
    let foo = Foo { foo1: 0, foo2: 0 };
    let foo2 = Foo { thing, $0 ..Default::default() }
}
```

**Before this PR**

```text
fd ..Default::default()
fd foo1             u32
fd foo2             u32
```

**After this PR**

```text
fd foo1 u32
fd foo2 u32
```
2025-12-28 17:34:34 +08:00
Lukas Wirth
5a119a5780
Merge pull request #21352 from Veykril/push-knwlqypxtukr
minor: Remove unneeded allocation in proc-macro-srv-cli
2025-12-28 09:26:44 +00:00