512 Commits

Author SHA1 Message Date
Lukas Wirth
23712aea06 cargo upgrade 2025-06-13 10:08:20 +02:00
Laurențiu Nicola
273514a9fb Merge from rust-lang/rust 2025-06-09 15:44:40 +03:00
Paolo Barbolini
69f077653a Stabilize const_eq_ignore_ascii_case 2025-06-05 07:09:16 +00:00
Lukas Wirth
96c4455114 fix: Fix edition handling for names in rename logic 2025-06-02 15:27:13 +02:00
Lukas Wirth
42e8e4ac4e Enhance renaming to include identifiers that are generated from the original symbol
Co-authored-by: Jake Goulding <jake.goulding@integer32.com>
2025-06-02 15:26:21 +02:00
Lukas Wirth
38bf4b1fe1 internal: Restructure some semantics APIs for virtual macro files 2025-05-30 22:03:04 +02:00
Lukas Wirth
1f0052a496 fix: Fix import insertion not being fully cfg aware 2025-05-29 14:55:09 +02:00
Lukas Wirth
de4b7b642b
Merge pull request #19864 from ChayimFriedman2/is-in-macro
fix: Properly implement `might_be_inside_macro_call()` using semantic information instead of syntactical hacks
2025-05-26 05:21:01 +00:00
Chayim Refael Friedman
87529e8631 Properly implement might_be_inside_macro_call() using semantic information instead of syntactical hacks
And rename it to `is_inside_macro_call()` accordingly.
2025-05-25 20:15:58 +03:00
Lukas Wirth
cbff4ae151 Bump salsa 2025-05-23 12:58:00 +02:00
Laurențiu Nicola
9e86544698 Merge from rust-lang/rust 2025-05-20 10:01:00 +03:00
Dietrich Daroch
3faf03f6b4 Split duration_constructors to get non-controversial bits out faster. 2025-05-09 22:52:39 -04:00
Lukas Wirth
8b624868e4
Merge pull request #19507 from Hmikihiro/fix_module_doc_links
fix: resolve doc path from parent module if outer comments exist on module
2025-05-08 16:34:35 +00:00
Hayashi Mikihiro
778322eb31 check module path inner or outer
Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com>
2025-05-07 00:36:17 +09:00
Chayim Refael Friedman
f23af9291c Notify the user that we're collecting symbols
It could be confusing if they see "Indexing n/n" but cache priming does not finish.
2025-05-06 10:29:53 +03:00
Chayim Refael Friedman
1c7a94f37d Add a --num-threads to the prime-caches CLI command
And make it parallel by default (and remove the `--parallel` flag) to mirror the IDE cache priming.
2025-05-05 23:55:11 +03:00
Chayim Refael Friedman
27dc8ad21b Better manage parallel prime caches
To make best use of available cores, and don't waste time waiting for other tasks. See the comments in the code for explanation.
2025-05-05 23:54:34 +03:00
Lukas Wirth
46df704c89 fix: Remove unnecessary token length check for macros in renaming 2025-05-05 16:54:38 +02:00
Lukas Wirth
581646236e refactor: De-arc defmap queries 2025-05-05 09:04:52 +02:00
Matthias Krüger
573c47c9ba remove a couple of clones 2025-05-01 11:41:42 +02:00
Lukas Wirth
996d6ed1a3 Split out salsa_macros
Does not do much yet due to tracing pulling syn but oh well
2025-04-29 19:43:36 +02:00
Lukas Wirth
d11dbf648f Cleanup cfg check handling in expression store lowering 2025-04-29 11:44:11 +02:00
Lukas Wirth
7d9b839f9c refactor: Clean up cache priming cancellation handling 2025-04-29 10:40:31 +02:00
Lukas Wirth
0fee71065b
Merge pull request #19704 from Veykril/push-wrvznvvpvtvp
Add expression fill mode variant for filling with underscore expressions
2025-04-28 09:45:04 +00:00
Lukas Wirth
7e526b6be7 Add expression fill mode variant for filling with underscore expressions 2025-04-28 10:39:36 +02:00
Laurențiu Nicola
6225bb9c44 Merge from rust-lang/rust 2025-04-28 11:06:53 +03:00
Lukas Wirth
1c68d83569
Merge pull request #19657 from ChayimFriedman2/better-offset-of
feat: Better support `offset_of!()`
2025-04-22 13:28:34 +00:00
Chayim Refael Friedman
8d824c7828 Resolve offset_of!() in IDE 2025-04-22 00:33:06 +03:00
Chayim Refael Friedman
9477e46bec Get rid of static predefined symbols
Make them all `const`.
2025-04-21 03:07:35 +03:00
Chayim Refael Friedman
c58ddafe90 Make HirFileId, EditionedFileId and macro files Salsa struct
And make more queries non-interned.

Also flip the default for queries, now the default is to not intern and to intern a query you need to say `invoke_interned`.
2025-04-19 22:10:52 +03:00
Chayim Refael Friedman
8a9a1e3345 Remove all upcasts!
It turns out there were a lot redundant too.
2025-04-10 11:08:38 +03:00
David Barsky
3e15dbc85f internal: fix NameGenerator's and AnyMap's rustdocs 2025-04-09 12:44:52 -04:00
Lukas Wirth
dc363f7f77
Merge pull request #19462 from Veykril/push-ypvprvvwkyll
refactor: Lower type-refs before type inference
2025-04-09 08:54:28 +00:00
Lukas Wirth
1fd9520c92 refactor: Lower type-refs before type inference
This refactors how we deal with items in hir-def lowering.

- It now lowers all of them through an "ExpressionStore" (kind of a misnomer as this point) as their so called *Signatures.
- We now uniformly lower type AST into TypeRefs before type inference.
- Likewise, this moves macro expansion out of type inference, resulting in a single place where we do non-defmap macro expansion.
- Finally, this PR removes a lot of information from ItemTree, making the DefMap a lot less likely to be recomputed and have it only depend on actual early name resolution related information (not 100% true, we still have ADT fields in there but thats a follow up removal).
2025-04-09 10:43:23 +02:00
Lukas Wirth
7255ef1375 fix(auto-import): Prefer imports of matching types for argument lists 2025-04-08 09:21:32 +02:00
BenjaminBrienen
2462624a7d prefer default over new 2025-04-04 15:49:50 +02:00
clubby789
546766f12b Stabilize cfg_boolean_literals 2025-04-03 18:10:48 +00:00
Prajwal S N
e02d76aa61
fix(ide-assists): remove AssistKind::None
This was being used by a single assist, which qualifies under the "refactor"
kind. The variant has been removed, and all usages updated accordingly.

Signed-off-by: Prajwal S N <prajwalnadig21@gmail.com>
2025-04-03 14:38:31 +05:30
Lukas Wirth
2b382eb772 fix: Cleanup param name inlay hint filtering 2025-03-31 09:40:57 +02:00
Lukas Wirth
2e1ff255ae
Merge pull request #19375 from ChayimFriedman2/do-not-complete
feat: Allow crate authors to control completion of their things
2025-03-28 09:06:19 +00:00
Chayim Refael Friedman
7b584ef9bf Allow crate authors to control completion of their things
Via the new `#[rust_analyzer::completions(...)]` attribute.

Also fix a bug with existing settings for that where the paths wouldn't resolve correctly.
2025-03-27 14:01:26 +02:00
Lukas Wirth
454e4be40d refactor: Use MEDIUM durability for crate-graph changes, high for library source files
The idea here is that the crate graph may change over time, but library source file contents *never* will (or really never should). Disconnecting the two means that queries that depend on library sources will not need to re-validatewhen the crate graph changes (unless they depend on the crate graph in some capacity).
2025-03-26 06:46:49 +01:00
Lukas Wirth
500ea05aef chore: Bump dependencies 2025-03-23 08:46:10 +01:00
Lukas Wirth
d4122434dd chore: Remove unused dependencies 2025-03-23 08:08:17 +01:00
Felicián Németh
f2ad0fcb21 Speed up resolving "Generate delegate method" assist (part 2)
Make it compile by adding a `None` subtype to rest of the AssistId
instantiations.
2025-03-22 09:58:44 +01:00
Felicián Németh
7aa70a86d1 Speed up resolving "Generate delegate method" assist (part 1)
Fix #19322

Sometimes there are 185 "Generate delegate" assists with the same
assist_id and asssist_kind.  This commit introduces and additional
differentiator: assist_subtype.  Therefore, when the LSP client sends
an assist resolve request, rust-analyzer only need to compute edits
for a single assist instead of 185.
2025-03-22 09:41:34 +01:00
Lukas Wirth
3086e5fe90 chore: Remove some unnecessary usage of Semantics 2025-03-21 20:09:03 +01:00
Lukas Wirth
a505420751 chore: Bump Edition::CURRENT to 2024 2025-03-17 12:29:19 +01:00
Michael Goulet
9f56c301d4 Suppress must_use for ControlFlow in rust-analyzer 2025-03-16 17:47:57 +00:00
BenjaminBrienen
7535bb4661 cargo fmt 2025-03-15 21:32:01 +01:00