Lukas Wirth
b94e766791
refactor: Cleanup descension stuff
2025-06-04 12:32:02 +02:00
Tyler Breisacher
4055436776
Add a quickfix for accessing a private field of a struct
2025-06-02 22:45:34 -07:00
Lukas Wirth
9a786d0008
Support derive-macros for rename prefix magic
2025-06-02 15:27:13 +02: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
5900e25edc
Merge pull request #19880 from Veykril/push-xmpxumsrkymk
...
fix: Handle included files better in IDE layer
2025-05-28 08:49:42 +00:00
Lukas Wirth
e72738de99
fix: Handle included files better in IDE layer
...
This does not fully fix things, but it introduces a function that can be used to fix occurences.
When using `to_def` functionality, the input node needs to come from the macro expanded include, not the real file that was included.
This does unfortunately add more caller burden, but there is not really a way around it.
2025-05-28 10:38:38 +02:00
Lukas Wirth
c44372d06c
Merge pull request #19876 from ShoyuVanilla/layout-padding
...
feat: Render padding information when hovering on structs
2025-05-28 08:16:38 +00:00
Shoyu Vanilla
e806957098
feat: Render padding information when hovering on structs
2025-05-28 14:18:50 +09:00
Lukas Wirth
5b28e9022e
Drop unnecessay code
2025-05-28 07:05:55 +02:00
Lukas Wirth
bbbcfaab8b
fix: Fix IDE layer not resolving some macro calls
2025-05-28 06:58:40 +02:00
Vincent Esche
a01fe887c6
Make Semantics<'db, DB> support Semantics<'db, dyn HirDatabase>, by use of DB: ?Sized
2025-05-27 10:43:28 +02:00
Chayim Refael Friedman
7fa66d67a7
Merge pull request #19862 from ChayimFriedman2/item-resolve-macro-hir
...
fix: Fix IDE resolution of item macros
2025-05-26 21:34:18 +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
Chayim Refael Friedman
3e0ab7219a
Fix IDE resolution of item macros
...
It wasn't inside the source, because there was no source map.
2025-05-25 17:20:20 +03:00
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