David Barsky
f3451d54d6
Back out "Merge record lit's ellipsis into pre-existing spread's variant"
...
This backs out commit c134b20c9cbc88a36e77acb8522e8dc4573bd906.
2025-01-27 17:30:35 -05:00
David Barsky
77c1507048
Back out "Compute diagnostics of a field body iff it has one"
...
This backs out commit b4d4d02db8a95f5507fbd0aa90904d7b774f0027.
2025-01-27 17:30:35 -05:00
David Barsky
55d3851820
Back out "Remove has_default
from FieldId
"
...
This backs out commit 8aa6c09fcee6270c787a6f00615d76343fbe5c07.
2025-01-27 17:30:34 -05:00
Lukas Wirth
b27c5b4cae
Merge pull request #19050 from ChayimFriedman2/iter-self
...
fix: Don't suggest `into_iter().method()` on iterators
2025-01-27 17:41:02 +00:00
Lukas Wirth
8384bc5c55
Merge pull request #19049 from ChayimFriedman2/add-reference-ty
...
minor: Remove duplicate method from `hir::Type`
2025-01-27 17:40:09 +00:00
Chayim Refael Friedman
cdc3f89a3f
Don't suggest into_iter().method()
on iterators
2025-01-27 18:48:20 +02:00
Chayim Refael Friedman
028c47999d
Remove duplicate method from hir::Type
...
I added it by mistake in #18927 .
I chose to keep the method as not static, because it's more comfortable, and keep the name `add_reference()` and not `reference()`, because it is clearer and better matches `strip_reference[s]()`.
2025-01-27 18:40:01 +02:00
Chayim Refael Friedman
55c63abc59
Fix #[rustc_deprecated_safe_2024]
...
It should be considered by the edition of the caller, not the callee.
Technically we still don't do it correctly - we need the span of the method name (if it comes from a macro), but we don't keep it and this is good enough for now.
2025-01-27 14:35:20 +02:00
Shoyu Vanilla
8aa6c09fce
Remove has_default
from FieldId
2025-01-27 19:41:58 +09:00
Shoyu Vanilla
b4d4d02db8
Compute diagnostics of a field body iff it has one
2025-01-27 19:41:57 +09:00
Shoyu Vanilla
c134b20c9c
Merge record lit's ellipsis into pre-existing spread's variant
2025-01-27 19:41:54 +09:00
Shoyu Vanilla
7de0b2e75a
feat: Implement default-field-values
2025-01-27 19:38:35 +09:00
Lukas Wirth
35b55fd67f
Merge pull request #19036 from Veykril/push-nprltlwvryxw
...
Split out `ExpressionStore` from `Body`
2025-01-27 07:54:44 +00:00
Chayim Refael Friedman
791b1ebfd4
Support RFC 2396
...
AKA. target_feature 1.1, or non unsafe target_feature.
2025-01-26 23:31:58 +02:00
Lukas Wirth
3bb0ff3480
Add GenericDefId::StaticId
2025-01-26 11:07:54 +01:00
Lukas Wirth
55d1d5dd8b
Split out ExpressionStore
from Body
2025-01-26 11:02:00 +01:00
Lukas Wirth
fbf3d08a30
Merge pull request #19026 from Veykril/push-wrxrutptywzx
...
Only collect implicit visibile use symbols if they have renames
2025-01-25 10:27:26 +00:00
Lukas Wirth
7acf8dcf7b
Only collect implicit visibile use symbols if they have renames
...
Otherwise this will pollute the index too much with unnecessary symbols
2025-01-25 11:12:06 +01:00
Lukas Wirth
6e4c29f7ce
Merge pull request #19018 from Veykril/push-wxqqunxwrply
...
internal: Record the use tree index in glob imports
2025-01-24 14:27:49 +00:00
Lukas Wirth
a62e2f513a
Merge pull request #18991 from Veykril/push-rmqmnrymwmoz
...
Keep already computed inlay hint properties instead of late resolving them
2025-01-24 14:27:43 +00:00
Lukas Wirth
433888c4b2
Record the use tree index in glob imports
2025-01-24 15:12:48 +01:00
Lukas Wirth
93de80d833
Merge pull request #19016 from Veykril/push-moqnsytyrupu
...
fix: Fix `ItemScope` not recording glob imports
2025-01-24 13:25:39 +00:00
Lukas Wirth
3b88a2f134
Fix ItemScope
not recording glob imports
...
This caused us other code to incorrectly assume in dealing with a declaration when in fact it was dealing with a glob imported definition
2025-01-24 14:11:45 +01:00
Lukas Wirth
831e3535e6
Fix Param::as_local treating closures wrong
2025-01-21 11:15:36 +01:00
Lukas Wirth
a3eee10638
Goto Display::fmt
when invoked on to_string
2025-01-20 17:00:28 +01:00
Lukas Wirth
0fdab1be36
Bring back goto def redirect for parse -> FromStr
2025-01-20 16:32:17 +01:00
Lukas Wirth
03ea40369f
Move dual blanket impl logic from source analyzer to goto_def
2025-01-20 16:24:42 +01:00
Lukas Wirth
93a5846784
Merge pull request #18967 from Veykril/push-pwonkmwqmmol
...
Properly record meaningful imports as re-exports in symbol index
2025-01-20 13:46:52 +00:00
Lukas Wirth
b2f822b074
Merge pull request #18934 from 1hakusai1/goto_definition_from_into
...
feat: Add the ability to jump from `into` to `from` definitions
2025-01-20 13:46:47 +00:00
Lukas Wirth
a06606c802
Fix import search not discarding rawness
2025-01-20 14:29:11 +01:00
Lukas Wirth
0480ebef75
Preserve impl assoc names in ImplData
2025-01-20 14:29:11 +01:00
Lukas Wirth
76c1a376c3
Vec -> Box<[_]>
2025-01-20 14:29:11 +01:00
Lukas Wirth
51cc1a4614
Properly record meaningful imports as re-exports in symbol index
2025-01-20 14:29:11 +01:00
1hakusai1
5384dd8947
Use Semantics::resolve_method_call_as_callable to find implementation
2025-01-20 21:17:48 +09:00
Lukas Wirth
132a2a03c4
Merge pull request #18951 from Veykril/push-zpvunsvlpuxt
...
Add missing `#[rust_analyzer::rust_fixture]` annotations
2025-01-16 10:21:22 +00:00
Lukas Wirth
3361b5701a
Generalize some type walking in hover type actions
2025-01-16 11:06:11 +01:00
Lukas Wirth
24e1db2f0c
Minor docs improvement
2025-01-16 11:05:20 +01:00
Lukas Wirth
c7f187430f
Merge pull request #18927 from ChayimFriedman2/skip-iter-await
...
feat: Add smart completions that skip `await` or `iter()` and `into_iter()`
2025-01-16 08:47:26 +00:00
Chayim Refael Friedman
cec9fa1606
Add smart completions that skip await
or iter()
and into_iter()
...
E.g. complete `await.foo()`.
2025-01-15 22:32:07 +02:00
Lukas Wirth
1fc15e0673
Merge pull request #18940 from Veykril/push-ulowqkpprslq
...
fix: Fix semantics not always correctly caching file roots
2025-01-15 12:54:58 +00:00
Lukas Wirth
d32b09dc1b
fix: Fix semantics not always correctly caching file roots
2025-01-15 13:40:25 +01:00
Lukas Wirth
2a89e4a051
Early exit in search properly
2025-01-15 09:47:45 +01:00
Lukas Wirth
3bae1f0a1b
Improve hover module path rendering
2025-01-10 12:36:55 +01:00
Lukas Wirth
6f04f373d7
Merge pull request #18902 from Veykril/push-znlsxykqrkoo
...
internal: Add Definition::Crate
2025-01-10 10:01:43 +00:00
Lukas Wirth
e6270bd378
internal: Add Definition::Crate
...
This is its own thing so it should be handled specifically where possible
2025-01-10 10:45:44 +01:00
Chayim Refael Friedman
87f7a5849c
Remove two hir reexports
2025-01-10 03:19:28 +02:00
Lukas Wirth
3fe50ef83c
Merge pull request #18861 from ChayimFriedman2/await-edition
...
fix: Make edition per-token, not per-file
2025-01-09 10:20:11 +00:00
Chayim Refael Friedman
97afb7bfba
Make edition per-token, not per-file
...
More correctly, *also* per-token. Because as it turns out, while the top-level edition affects parsing (I think), the per-token edition affects escaping of identifiers/keywords.
2025-01-09 05:43:08 +02:00
Lukas Wirth
acccd4bde6
fix: Fix env
/option_env
macro check disregarding macro_rules definitions
2025-01-08 10:59:58 +01:00
Laurențiu Nicola
cd12ef8547
Merge pull request #18853 from ChayimFriedman2/no-completion
...
Fix case where completion inside macro that expands to `#[test]` was unavailable
2025-01-07 06:44:50 +00:00