3094 Commits

Author SHA1 Message Date
Chayim Refael Friedman
6315e315ad Expand target info to include the architecture
And make it easier to expand it more in the future, if needed.
2025-09-09 13:47:26 +03:00
Ryan Mehri
ab44e6d504 make TryToNav take Semantics instead of RootDatabase 2025-09-08 15:59:46 -04:00
Ryan Mehri
091cc8dc47 add test 2025-09-08 14:33:25 -04:00
Ryan Mehri
535147d57f impl TryToNav for BuiltinType instead 2025-09-08 14:23:52 -04:00
Ryan Mehri
67a39886c3 feat: support navigation on primitives 2025-09-08 11:16:11 -04:00
Chayim Refael Friedman
9f7dd01bef Attach the db in one more place in highlighting 2025-08-28 01:25:09 +03:00
Chayim Refael Friedman
1efff4677e In highlight_related, when on an unsafe block, don't highlight unsafe operations of other unsafe blocks 2025-08-26 21:46:04 +03:00
Chayim Refael Friedman
eaf71411a9 Add an option to remove reborrows from adjustment inlay hints
Reborrows are consecutive deref then ref. Make it the default because reborrows are mostly useless to the programmer.

Also rename `rust-analyzer.inlayHints.expressionAdjustmentHints.enable: "reborrow"` to `rust-analyzer.inlayHints.expressionAdjustmentHints.enable: "borrows"`, as it's not about reborrows but about any ref/deref and it's confusing with the new setting.
2025-08-24 02:26:37 +03:00
Lukas Wirth
0914f78f23 Fix panic in syntax_highlighting 2025-08-22 09:00:25 +02:00
Chayim Refael Friedman
df375b0855 Remove unnecessary salsa::attach() calls 2025-08-21 22:40:58 +03:00
Chayim Refael Friedman
7a27a27f4b Attach the DB when mapping the result of world_symbols()
We call `try_to_nav()` there.
2025-08-21 08:06:43 +03:00
Lukas Wirth
aed0fec1a9 Auto-attach database in Analysis calls 2025-08-18 09:52:23 +02:00
jackh726
7f0ec8b69f Replace layout_of_ty with layout_of_ty_ns 2025-08-17 16:04:50 +00:00
jackh726
f9d2d2dd87 Switch associated_type_shorthand_candidates to lower_nextsolver 2025-08-17 16:04:50 +00:00
jackh726
aa890b49ff Change direct_super_traits to use generic_predicates_for_param_ns 2025-08-17 16:04:50 +00:00
jackh726
eeaefa4b9d impl HirDisplay for next_solver::Ty 2025-08-17 16:04:49 +00:00
Lukas Wirth
ac9d0f8049
Merge pull request #20376 from fee1-dead/traitalias
Merge Trait and TraitAlias handling
2025-08-13 08:27:54 +00:00
Lukas Wirth
90647a195f fix: Attach db for inlay hint compute 2025-08-13 09:42:50 +02:00
Deadbeef
d9f67325ab fix errors after rebase 2025-08-13 15:33:08 +08:00
Deadbeef
82f174fbd9 Merge Trait and TraitAlias handling 2025-08-13 15:28:08 +08:00
Lukas Wirth
a9450ebba3
Merge pull request #20329 from jackh726/next-trait-solver-querify
Switch from Chalk to the next trait solver
2025-08-13 06:10:45 +00:00
Ifeanyi Orizu
0a4d7dcdda Fix minor things 2025-08-10 17:48:17 -05:00
Ifeanyi Orizu
dc6e6d2b86 Add config option to exclude locals from doc search 2025-08-10 17:48:17 -05:00
jackh726
9418a3f2df Implement next trait solver 2025-08-09 16:08:58 +00:00
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