Hayashi Mikihiro
bf13549ab6
rename fn name take_path to any
...
Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com>
2025-05-15 13:18:30 +09:00
Hayashi Mikihiro
30fe761685
fix: Removing all unused imports removes used imports for imports used for Derive macros
...
Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com>
2025-05-14 23:51:23 +09: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
Hayashi Mikihiro
9f6b4255c2
fix: resolve doc path if outer comments exist on module and replace from cfg_attr bit to doc_place bit
...
Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com>
2025-05-06 17:45:09 +09: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
4cc6ee3f01
refactor: Remove unnecessary extension trait
2025-04-29 13:53:57 +02:00
Lukas Wirth
7d9b839f9c
refactor: Clean up cache priming cancellation handling
2025-04-29 10:40:31 +02:00
Lukas Wirth
6355df9c57
refactor: De-arc lang item queries
2025-04-28 17:17:39 +02:00
Lukas Wirth
5adee2ad2c
Merge pull request #19706 from Veykril/push-nkpmknlvzyom
...
fix: Address minor FIXME
2025-04-28 10:12:20 +00:00
Lukas Wirth
48fb00c19d
fix: Address minor FIXME
2025-04-28 11:55:26 +02:00
Lukas Wirth
4a2eaddc77
refactor: Remove WherePredicateTypeTarget
2025-04-24 09:13:56 +02:00
Chayim Refael Friedman
adcf699ea3
Properly handle lifetimes when checking generic arguments len
...
And also, prepare for correct lowering of lifetime. We still don't handle most lifetimes correctly, but a bit more of the foundation to lifetime elision is now implemented.
2025-04-24 08:35:20 +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
99ce53b1d7
Add two new diagnostics: one for mismatch in generic arguments count, and another for mismatch in their kind
...
Also known as E0747 and E0107.
And by the way, rewrite how we lower generic arguments and deduplicate it between paths and method calls. The new version is taken almost straight from rustc.
This commit also changes the binders of `generic_defaults()`, to only include the binders of the arguments up to (and not including) the current argument. This make it easier to handle it in the rewritten lowering of generic args. It's also how rustc does it.
2025-04-22 14:55:43 +03:00
Lukas Wirth
9a9f4e7f63
Merge pull request #19624 from jackh726/chalk-update
...
Update chalk
2025-04-22 10:58:31 +00:00
Chayim Refael Friedman
8d824c7828
Resolve offset_of!()
in IDE
2025-04-22 00:33:06 +03:00
Chayim Refael Friedman
0f325c7ff8
Remove unnecessary predefined symbol clones
...
Now that they're const it's no longer needed.
Nothing manual was performed: only a regexp search of `sym::([\w][\w\d]*)\.clone\(\)` and replace by `sym::$1`.
2025-04-21 03:10:13 +03:00
Chayim Refael Friedman
9477e46bec
Get rid of static predefined symbols
...
Make them all `const`.
2025-04-21 03:07:35 +03:00
jackh726
6daa791fab
Update chalk
2025-04-20 16:20:08 +00:00
Chayim Refael Friedman
150bb4a00f
Merge pull request #19617 from ChayimFriedman2/more-actual
...
internal: Make `HirFileId`, `EditionedFileId` and macro files Salsa struct
2025-04-19 19:21:53 +00: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
346f2d7559
Fix a panic when a trait method in an impl declares a lifetime parameter not in the trait declaration
...
Shuffle the code a bit.
2025-04-18 06:28:17 +03:00
Lukas Wirth
40076b577f
internal: Render sigantures with view hir command
2025-04-13 12:13:28 +02:00
Chayim Refael Friedman
96925d5105
Merge pull request #19570 from ChayimFriedman2/fix-store-panic
...
fix: Fix an incorrect `ExpressionStore` that was passed
2025-04-10 21:46:18 +00:00
Chayim Refael Friedman
8bde16dcce
Fix an incorrect ExpressionStore
that was passed
...
It caused panics everywhere.
2025-04-11 00:34:13 +03:00
Lukas Wirth
4fdc2507c6
fix: Fix invalid signature bitflags
2025-04-10 15:39:27 +02:00
Lukas Wirth
f880acd18c
Merge pull request #19461 from Hmikihiro/shadow_by_module
...
fix: shadow type by module
2025-04-10 12:20:14 +00: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
Hayashi Mikihiro
1b471ebfd5
TypeNs contain module
...
Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com>
2025-04-10 16:29:10 +09:00
Hayashi Mikihiro
a7dc60a2c4
return single option
...
Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com>
2025-04-10 16:29:10 +09:00
Hayashi Mikihiro
2854ad9a41
fix: shadow type by module
...
Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com>
2025-04-10 16:29:10 +09:00
Lukas Wirth
07212140db
refactor: Turn LifetimeRef
into an enum
...
This makes things more structured
2025-04-09 15:58:06 +02: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
e7ce86ddea
fix: Fix format_args
lowering for >=1.87
2025-04-06 10:05:56 +02:00
Lukas Wirth
1e1571e1c8
fix: Fix new nightly lints
2025-03-31 13:27:54 +02:00
Lukas Wirth
2b382eb772
fix: Cleanup param name inlay hint filtering
2025-03-31 09:40:57 +02: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
500ea05aef
chore: Bump dependencies
2025-03-23 08:46:10 +01:00
Lukas Wirth
3086e5fe90
chore: Remove some unnecessary usage of Semantics
2025-03-21 20:09:03 +01:00
Chayim Refael Friedman
ced6ea5cd0
Remove unnecessary expansions
...
In the body source map, we record each macro call with the `ExprOrPatId` it resolved to, so to lookup the `ExprId` of some node, we don't need to expand it!
2025-03-20 21:49:18 +02:00
Lukas Wirth
8b5816b4f5
Merge pull request #19363 from euclio/varargs-detail
...
display varargs in completion detail
2025-03-16 13:43:11 +00:00
Lukas Wirth
918740358b
Merge pull request #19354 from ChayimFriedman2/rtn-prep
...
Preparation to Return Type Notation (RTN)
2025-03-16 13:21:23 +00:00
Lukas Wirth
b5eedad8e3
refactor: Remove unnecessary Arc
2025-03-16 10:27:48 +01:00
Andy Russell
e9403853c0
display varargs in completion detail
2025-03-15 16:36:14 -04:00
BenjaminBrienen
7535bb4661
cargo fmt
2025-03-15 21:32:01 +01:00
BenjaminBrienen
aad66c7bf1
Fix 2024 syntax errors
2025-03-15 21:32:01 +01:00
Lukas Wirth
02a793bd59
chore: Remove legacy SyntaxContextId
re-export
2025-03-15 17:09:17 +01:00
Lukas Wirth
2ea09b2e47
Split variant_data
into its own query
2025-03-14 14:16:33 +01:00
Lukas Wirth
8e8d997304
Split enum variants out of enum_data
query
2025-03-14 13:32:53 +01:00