3070 Commits

Author SHA1 Message Date
Lukas Wirth
23504e1675
Merge pull request #20392 from rust-lang/veykril/push-pxplxplxvvyy
Report the incorrect payload when failing to deserialize lsp messages
2025-08-06 15:42:24 +00:00
Lukas Wirth
ae8b69f33a Report the incorrect payload when failing to deserialize lsp messages 2025-08-06 17:30:18 +02:00
Shoyu Vanilla (Flint)
8241ec6b02
Merge pull request #20387 from ChayimFriedman2/rename-macro
fix: Do not remove the original token when descending into derives
2025-08-06 10:17:18 +00:00
vinícius x
d399beca79 fix external docs for exported macros
add test
2025-08-05 18:09:10 -03:00
Chayim Refael Friedman
47845d6097 Allow renaming when there are multiple definitions (due to macros) even when some cannot rename 2025-08-05 00:10:21 +03:00
Laurențiu Nicola
978393bae8
Merge pull request #20378 from skewb1k/chore/folding_ranges-perms
chore: fix crates/ide/src/folding_ranges.rs file perms
2025-08-04 15:15:27 +00:00
Chayim Refael Friedman
1a6f7c2dcf Correctly goto From impl when on into() even when the call is inside a macro
Descend into macros first.
2025-08-04 17:41:00 +03:00
skewb1k
865b8802e6 chore: fix crates/ide/src/folding_ranges.rs file perms
755 -> 644
2025-08-04 14:19:31 +03:00
Chayim Refael Friedman
74ecb1e788 When renaming a parameter to self, change callers to use method call syntax 2025-08-02 21:39:22 +03:00
Lukas Wirth
8ce30264c8 cargo clippy --fix 2025-07-31 10:55:10 +02:00
Lukas Wirth
e57f18480d
Merge pull request #20337 from ChayimFriedman2/double-inlay-hints
fix: When displaying a projection into a type parameter that has bounds as `impl Trait`, collect only the bounds of this projection
2025-07-29 11:52:03 +00:00
Chayim Refael Friedman
9b8c5cfb0c When displaying a projection into a type parameter that has bounds as impl Trait, collect only the bounds of this projection
It used to collect the bounds of them all.
2025-07-29 14:40:14 +03:00
Lukas Wirth
c81560c628 fix: Do not require all rename definitions to be renameable 2025-07-29 08:31:08 +02:00
Young-Flash
bb163570f2 minor: fix typo 2025-07-27 10:54:43 +08:00
Young-Flash
a56035dd4e test: add test case for fold doc comment for multiline param list fn 2025-07-26 11:59:50 +08:00
Young-Flash
a0c7a4ab83 fix fold doc comment for multiline param list fn 2025-07-26 11:57:48 +08:00
Chayim Refael Friedman
1bf93c38ad
Merge pull request #20285 from A4-Tacks/fix-rename-self
Change rename self to parameter use `Self` type
2025-07-23 14:29:07 +00:00
A4-Tacks
9ecd82be13
Remove rename_self_outside_of_methods 2025-07-23 22:04:59 +08:00
A4-Tacks
4b32a49ef1
Change rename self to parameter use Self type
And add `&self` lifetime support

Example
===

Rename to `this`

```rust
struct Foo<T>(T);
impl Foo<i32> {
    fn foo(&'static self$0) {}
}
```

Old:

```rust
struct Foo<T>(T);
impl Foo<i32> {
    fn foo(this: &Foo) {}
}
```

Fixes:

```rust
struct Foo<T>(T);
impl Foo<i32> {
    fn foo(this: &'static Self) {}
}
```
2025-07-23 13:51:28 +08:00
Chayim Refael Friedman
c7ceb39f67 Parse for<'a> [const]
And also refactor parsing of HRTB.
2025-07-22 16:24:42 +03:00
Chayim Refael Friedman
7723b21c3f Fix search of raw labels and lifetimes
It used to search for `'foo` which won't find `'r#foo`, now we search for `foo` instead.
2025-07-20 01:20:09 +03:00
Young-Flash
0901631095 minor: remove unused var 2025-07-19 16:19:20 +08:00
Laurențiu Nicola
f373437c22 Merge from rust-lang/rust 2025-07-15 17:27:46 +03:00
Shoyu Vanilla (Flint)
a489123e80
Merge pull request #20232 from ShoyuVanilla/issue-20225
fix: Normalize projection types before calculating memory maps
2025-07-11 19:32:53 +00:00
Chayim Refael Friedman
4b29a9d6ea
Merge pull request #20219 from ChayimFriedman2/expr-store-mem
perf: Put the expression stuff in the expression store behind an `Option<Box>`
2025-07-11 14:25:39 +00:00
Shoyu Vanilla
4b2593085d fix: Normalize projection types before calculating memory maps 2025-07-11 23:10:03 +09:00
Shoyu Vanilla (Flint)
600f573256
Merge pull request #20054 from Young-Flash/folding_all
feat: support folding multiline arg list & fn body in one folding range
2025-07-10 12:05:31 +00:00
Shoyu Vanilla (Flint)
eede8f1f4e
Merge pull request #20212 from ChayimFriedman2/dyn-hint
fix: Fixes for `dyn` inlay hint
2025-07-10 04:57:57 +00:00
Chayim Refael Friedman
ad708fdbd1 Put the expression stuff in the expression store behind an Option<Box>
And leave only the type stuff without it.

This is because most expression stores don't have anything but types (e.g. generics, fields, signatures) so this saves a lot of memory.

This saves 58mb on `analysis-stats .`.
2025-07-10 05:18:43 +03:00
Chayim Refael Friedman
a8e67dffca Put dyn inlay hints in their correct place in presence of parentheses 2025-07-09 19:33:47 +03:00
Chayim Refael Friedman
3931afa624 Don't show dyn hint in a HRTB bound 2025-07-09 19:19:51 +03:00
Matthias Krüger
23584a4666
Rollup merge of #143340 - nabijaczleweli:awhile, r=mati865
awhile -> a while where appropriate
2025-07-07 19:55:32 +02:00
Chayim Refael Friedman
793e1573d4 Fix a case where the link type was None
Which caused a panic.
2025-07-07 20:44:18 +03:00
Lukas Wirth
da1888a75c
Merge pull request #20031 from jnyfah/some-branch
Fix: Resolve HIR display length issues and improve adjustment tooltips
2025-07-04 09:20:14 +00:00
Chayim Refael Friedman
c0d9c95926
Merge pull request #20120 from Hmikihiro/match_bind_not_type
fix: resolve item in match bind
2025-07-03 15:27:07 +00:00
Hayashi Mikihiro
07a1b4e69f fix: resolve item in match bind
Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com>
2025-07-03 23:57:18 +09:00
Lukas Wirth
2480a42ff4 fix: Improve diagnostic ranges for macro_calls!
We used to point to the entire macro call including its token tree if we couldn't upmap the diagnostic to the input
This generally makes things very noisy as the entire macro call will turn red on errors.
Instead, we now macro the path and `!` (bang) token as the error source range which is a lot nicer on the eyes.
2025-07-03 14:12:27 +02:00
Lukas Wirth
8029c731ed Bump salsa 2025-07-03 10:05:16 +02:00
Chayim Refael Friedman
3d88c1e647 Remove keyword prefixes (macro@ or macro ) from links in the docs only if the link target is inferred
That is, do it for `[macro foo]`, but not for `[macro foo](macro foo)`.
2025-07-03 00:41:47 +03:00
наб
b58b54bb4b
awhile -> a while where appropriate 2025-07-02 20:17:29 +02:00
Young-Flash
d94a832264 test: add test case for func with multiline param list 2025-06-30 17:36:16 +08:00
Young-Flash
5ae67747f5 internal: add FoldKind::Function 2025-06-30 17:36:16 +08:00
Young-Flash
8ac661eaa9 feat: support folding multiline arg list & fn body in one folding range 2025-06-30 17:34:02 +08:00
Chayim Refael Friedman
a6c1fa01d9
Merge pull request #20100 from ShoyuVanilla/ignore-sized-hierarchy
Backport new sized-hierarchy trait bounds in old ways
2025-06-26 20:37:18 +00:00
Shoyu Vanilla
953e9d1c36 Backport new sized-hierarchy trait bounds in old ways 2025-06-26 23:22:26 +09:00
roifewu
15e70c21d8 refactor: enhance highlighting for control flow kws in macros 2025-06-26 13:43:15 +08:00
roifewu
79de21bd9d refactor: simplify functions related to branch_exit_points in highlight_related 2025-06-26 13:41:41 +08:00
roifewu
c36758def4 refactor: rename branches to branch_exit_points in highlight_related 2025-06-26 13:41:41 +08:00
roifewu
9fa0543504 refactor: improve macro handling in navigation for control-flow kws 2025-06-26 13:41:41 +08:00
roifewu
f87220e22a feat: highlighting of related return values while the cursor is on any match, if, or match arm arrow (=>) 2025-06-26 13:41:39 +08:00