Lukas Wirth
c075a9980e
Fix name fetching being incorrect for asm operands
2024-09-05 13:41:03 +02:00
Lukas Wirth
564926ac99
Add missing doc comments
2024-09-05 13:19:32 +02:00
Lukas Wirth
95d8d8e697
Support more IDE features for asm operands
2024-09-05 13:19:02 +02:00
Lukas Wirth
811905fce8
Give InlineAsmOperand a HIR representation
2024-09-05 12:40:48 +02:00
Lukas Wirth
a600e1df73
Add Definition kind for asm register operand
2024-09-05 10:53:07 +02:00
Lukas Wirth
164b15bc62
Add Definition kind for asm register classes
2024-09-05 10:23:00 +02:00
Lukas Wirth
3b11ff8c4d
Lower asm expressions
2024-09-05 09:59:08 +02:00
coekjan
0b9d2725ae
fix: Fix inline_const_as_literal
error when the number >= 10
2024-09-05 14:26:21 +08:00
David Barsky
9d74b5f264
assist: ensure replace_qualified_name_with_use applies to the first path segment
2024-09-04 12:15:28 -04:00
Lukas Wirth
86658c66b4
Parse builtin#asm expressions
2024-09-04 14:09:03 +02:00
bors
50882fbfa2
Auto merge of #18045 - Veykril:fix-loop-lower, r=Veykril
...
fix: Fix lowering of for loops dropping the loop block
2024-09-04 10:03:39 +00:00
Lukas Wirth
fbca403ebe
fix: Fix lowering of for loops dropping the loop
block
2024-09-04 12:00:16 +02:00
bors
a3f302ec4c
Auto merge of #18044 - Veykril:highlight-kw-test, r=Veykril
...
internal: Add edition dependent keyword highlighting tests
2024-09-04 09:49:17 +00:00
Lukas Wirth
230cd21bed
Add edition dependent keyword highlighting tests
2024-09-04 11:32:59 +02:00
DropDemBits
12c62662aa
bundle old root into SyntaxEdit
result
...
useful for `SourceChangeBuilder` so it can still perform a tree diff without having to store the old root separately
2024-09-03 11:20:23 -04:00
bors
b10dd83c2e
Auto merge of #18036 - Veykril:smol_str, r=Veykril
...
Bump `smol_str`
2024-09-03 09:59:33 +00:00
Lukas Wirth
e517b84d98
Bump smol_str
2024-09-03 11:54:33 +02:00
bors
6e8445139b
Auto merge of #17984 - ShoyuVanilla:cast, r=Veykril
...
feat: Implement cast typecheck and diagnostics
Fixes #17897 and fixes #16564
Mainly adopted from 100fde5246/compiler/rustc_hir_typeck/src/cast.rs
2024-09-03 06:00:10 +00:00
bors
1fddb11f0f
Auto merge of #18031 - roife:suggest-name-in-completion, r=Veykril
...
feat: Suggest name in completion for let_stmt and fn_param
fix #17780
1. Refactor: move `ide_assist::utils::suggest_name` to `ide-db::syntax_helpers::suggest_name` for reuse.
2. When completing `IdentPat`, detecte if the current node is a `let_stmt` or `fn_param`, and suggesting a new name based on the context.
2024-09-03 05:45:53 +00:00
DropDemBits
69e8393963
misc fixes
2024-09-02 22:53:54 -04:00
DropDemBits
d929121f7b
handle replace_with_many and replace_all
2024-09-02 22:27:14 -04:00
DropDemBits
41dbaa415a
support replacing root node
2024-09-02 21:42:08 -04:00
DropDemBits
b565d8db74
properly sort changes by depth to sort between nodes that have the same start range
2024-09-02 21:34:00 -04:00
DropDemBits
5fe518361e
fix insert ranges not being excluded from disjointness
2024-09-02 20:45:57 -04:00
DropDemBits
21bb04d3a6
support insert{_all}
2024-09-02 19:11:39 -04:00
DropDemBits
3440408087
propagate annotations to mapped elements
2024-09-02 18:24:47 -04:00
roife
35ed65a513
tests: suggesting names in completions for let_stmt and fn_param
2024-09-03 05:23:04 +08:00
roife
492e66ceab
feat: suggest name in let_stmt and fn_param
2024-09-03 05:22:55 +08:00
roife
b207e5781e
refactor: move ide_assist::utils::suggest_name to ide-db
2024-09-03 05:21:05 +08:00
Shoyu Vanilla
d186bdc617
feat: Implement cast typechecks
2024-09-03 04:11:36 +09:00
bors
304e5f58cd
Auto merge of #18029 - lnicola:minor-stuff, r=lnicola
...
minor: fix two nits
2024-09-02 17:07:43 +00:00
Laurențiu Nicola
98cc4b6115
Merge some strings
2024-09-02 20:05:35 +03:00
Laurențiu Nicola
d398b8f3f9
Avoid Option::is_none_or for a while
2024-09-02 20:04:35 +03:00
bors
5461f494e6
Auto merge of #18028 - Veykril:lifetime-hints-panic, r=Veykril
...
fix: lifetime hint panic in non generic defs
2024-09-02 16:05:36 +00:00
Lukas Wirth
134e0a4e87
fix: lifetime hint panic in non generic defs
2024-09-02 18:04:21 +02:00
bors
d534cc63d3
Auto merge of #18016 - IvarWithoutBones:wrap-return-ty-local-result, r=Veykril
...
fix: use Result type aliases in "Wrap return type in Result" assist
This commit makes the "Wrap return type in Result" assist prefer type aliases of standard library type when the are in scope, use at least one generic parameter, and have the name `Result`.
The last restriction was made in an attempt to avoid false assumptions about which type the user is referring to, but that might be overly strict. We could also do something like this, in order of priority:
* Use the alias named "Result".
* Use any alias if only a single one is in scope, otherwise:
* Use the standard library type.
This is easy to add if others feel differently that is appropriate, just let me know.
Fixes #17796
2024-09-02 11:33:44 +00:00
bors
6341e88daa
Auto merge of #18026 - Veykril:completions, r=Veykril
...
internal: Adjust completions scoring
2024-09-02 11:19:33 +00:00
Lukas Wirth
8c59bbe916
Adjust completions scoring
2024-09-02 13:17:52 +02:00
Lukas Wirth
26cd745104
Simplify CompletionRelevance
2024-09-02 13:17:49 +02:00
bors
21b7608fd7
Auto merge of #18025 - cuishuang:master, r=lnicola
...
minor: remove repetitive words
2024-09-02 10:48:27 +00:00
cuishuang
680de15ec3
chore: fix some comments
...
Signed-off-by: cuishuang <imcusg@gmail.com>
2024-09-02 18:33:23 +08:00
DropDemBits
db649195e9
handle merging two syntax editors together
2024-09-02 00:09:30 -04:00
DropDemBits
883e429179
elaborate SyntaxEdit comments
2024-09-02 00:02:32 -04:00
DropDemBits
ad9595d729
wip: new syntax tree editor
2024-09-02 00:02:32 -04:00
Ivar Scholten
4e9d17b96d
fix: use Result type aliases in "Wrap return type in Result" assist
...
This commit makes the "Wrap return type in Result" assist prefer type aliases of standard library
type when the are in scope, use at least one generic parameter, and have the name "Result".
The last restriction was made in an attempt to avoid false assumptions about which type the
user is referring to, but that might be overly strict. We could also do something like this, in
order of priority:
* Use the alias named "Result".
* Use any alias if only a single one is in scope, otherwise:
* Use the standard library type.
This is easy to add if others feel differently that is appropriate, just let me know.
2024-09-02 02:00:19 +02:00
bors
779d9eee2e
Auto merge of #17967 - Veykril:mbe-tests, r=Veykril
...
internal: Lay basic ground work for standalone mbe tests
Most of our mbe hir-def tests don't actually do anything name res relevant, we can (and should) move those down the stack into `mbe/hir-expand`.
2024-09-01 11:44:58 +00:00
Lukas Wirth
4502a602a7
internal: Lay basic ground work for standalone mbe tests
2024-09-01 12:42:44 +02:00
bors
bae49517f2
Auto merge of #17985 - riverbl:explicit-enum-discriminant, r=Veykril
...
Add explicit enum discriminant assist
Add assist for adding explicit discriminants to all variants of an enum.
Closes #17798 .
2024-09-01 09:38:28 +00:00
Lukas Wirth
1e30cc0f35
minor: Reduce friction for updating minicore
2024-09-01 11:32:55 +02:00
bors
72fe274605
Auto merge of #17737 - hyf0:hyf_32089420384, r=Veykril
...
feat(ide-completion): extra sugar auto-completion `async fn ...` in `impl trait` for `async fn in trait` that's defined in desugar form
Solves #17719 .
---
Preview
<img width="670" alt="image" src="https://github.com/user-attachments/assets/64ccef84-4062-4702-8760-89220585f422 ">
<img width="540" alt="image" src="https://github.com/user-attachments/assets/d22637f9-d531-43b2-a9f1-cd40a002903a ">
<img width="631" alt="image" src="https://github.com/user-attachments/assets/21cd2142-bb8e-4493-9ac7-e6a9e7076904 ">
2024-09-01 09:24:04 +00:00