Laurențiu Nicola
a91fb2b9a1
Merge pull request #20620 from A4-Tacks/let-else-completion
...
fix: add `else` keyword completion after `let` statements
2025-09-08 06:03:00 +00:00
A4-Tacks
56114fc302
Add allow else
keyword completion in LetStmt
...
Example
---
```rust
fn foo() {
let _ = 2 el$0
}
```
->
```rust
fn foo() {
let _ = 2 else {
$0
};
}
```
2025-09-06 13:09:07 +08:00
Chayim Refael Friedman
8a2e845e58
Deduplicate methods in completion by function ID and not by name
...
Because duplicates can be found with traits. Worse, the inherent methods could be private, and we'll discover that only later. But even if they're not they're different methods, and its seems worthy to present them all to the user.
2025-09-02 08:16:36 +03:00
Chayim Refael Friedman
870cb3329b
Merge pull request #20423 from ShoyuVanilla/import-2024
...
Make import sorting order follow 2024 edition style
2025-08-25 19:19:31 +00:00
Chayim Refael Friedman
05b7cbc236
Merge pull request #20507 from A4-Tacks/suggest-return-expr
...
Add ReturnExpr completion suggest
2025-08-24 00:46:49 +00:00
A4-Tacks
ac7615b2a3
Add ReturnExpr completion suggest
2025-08-24 08:26:25 +08:00
Chayim Refael Friedman
544ef84898
Merge pull request #20513 from A4-Tacks/let-in-let-chain
...
Add let in let-chain completion support
2025-08-23 22:17:27 +00:00
A4-Tacks
3e48de3905
Fix else
completion in let _ = if x {} $0
2025-08-23 17:48:30 +08:00
A4-Tacks
6a7a0fac95
Add let in let-chain completion support
...
Example
---
```rust
fn f() {
if true && $0 {}
}
```
->
```rust
fn f() {
if true && let $1 = $0 {}
}
```
2025-08-22 21:58:49 +08:00
Lukas Wirth
aed0fec1a9
Auto-attach database in Analysis
calls
2025-08-18 09:52:23 +02:00
jackh726
496f5f9e96
Cleanup assoc_type_shorthand_candidates
2025-08-17 16:04:50 +00:00
jackh726
eeaefa4b9d
impl HirDisplay for next_solver::Ty
2025-08-17 16:04:49 +00:00
Chayim Refael Friedman
b06ce60086
Merge pull request #20390 from A4-Tacks/if-else-comp-in-args-or-let
...
Add if..else completions in LetStmt and ArgList
2025-08-13 16:44:39 +00:00
Deadbeef
82f174fbd9
Merge Trait and TraitAlias handling
2025-08-13 15:28:08 +08:00
Shoyu Vanilla
635b536f11
Make import sorting order follow 2024 edition style
2025-08-12 00:01:46 +09:00
jackh726
9418a3f2df
Implement next trait solver
2025-08-09 16:08:58 +00:00
Chayim Refael Friedman
bd08e2e480
Merge pull request #20381 from A4-Tacks/fix-assign-sug
...
Add assignment type analysis for ide-completion
2025-08-05 15:17:49 +00:00
A4-Tacks
bfbeddf32e
Change prev whitespace to prev trivia
2025-08-05 20:54:38 +08:00
A4-Tacks
5704431823
Add if..else completions in LetStmt and ArgList
...
Example
===
```rust
let x = $0;
```
Old completions:
```rust
let x = if $1 {
$0
};
```
This PR current completions:
```rust
let x = if $1 {
$2
} else {
$0
};
```
2025-08-04 22:47:43 +08:00
A4-Tacks
22d6136462
Add assignment type analysis for ide-completion
2025-08-04 01:59:03 +08:00
Lukas Wirth
8ce30264c8
cargo clippy --fix
2025-07-31 10:55:10 +02:00
Hayashi Mikihiro
46e86c6aa2
Migrate PathTransform to SyntaxEditor
...
Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com>
2025-07-26 13:26:39 +09:00
A4-Tacks
d001e27173
Fix assoc type where clause position
2025-07-12 23:48:41 +08:00
Chayim Refael Friedman
9c4a7705b1
Fix some things with builtin derives
...
1. Err on unions on derive where it's required.
2. Err on `#[derive(Default)]` on enums without `#[default]` variant.
3. Don't add where bounds `T: Default` when expanding `Default` on enums (structs need that, enums not).
Also, because I was annoyed by that, in minicore, add a way to filter on multiple flags in the line-filter (`// :`). This is required for the `Debug` and `Hash` derives, because the derive should be in the prelude but the trait not.
2025-07-03 23:05:56 +03:00
yukang
d8b424cb4c
Remove unnecessary parens in closure
2025-06-29 19:28:48 +08:00
Chayim Refael Friedman
0b6df1716d
Fix completion in when typing integer.|
...
It should show integer, not floating point methods.
2025-06-27 00:12:27 +03:00
Chayim Refael Friedman
4db8341ddb
Prettify AST in PathTransform
if it's coming from a macro
2025-06-26 10:03:44 +03:00
Lukas Wirth
b50d527931
Merge pull request #20036 from Veykril/push-yquvoyrxkksx
...
Do not default to 'static for trait object lifetimes
2025-06-24 06:59:54 +00:00
Lukas Wirth
2b05bd7d7e
Do not default to 'static for trait object lifetimes
...
We lack trait object default lifetime elision, so `'static` can be wrong at times, confusing the user
2025-06-24 08:49:24 +02:00
Chayim Refael Friedman
de312d0c71
Don't run doctests
2025-06-23 00:50:22 +03:00
Shoyu Vanilla
4f8767d790
Minic rustc's new format_args!
expansion
2025-06-22 13:22:28 +09:00
Lukas Wirth
6301c35cf3
Revert "Turn BlockId
into a #[salsa::tracked]
"
...
This reverts commit 8643a858dbaf12b37e90b603cdee64434576c229.
2025-06-19 07:40:01 +02:00
Laurențiu Nicola
5d93e31067
Merge pull request #20025 from SoxPopuli/hide_private_imports_without_pe
...
Hide imported privates if private editable is disabled
2025-06-17 15:27:27 +00:00
Charlotte Smith
e6a4602209
Hide imported privates if private editable is disabled
2025-06-17 15:38:15 +01:00
Lukas Wirth
3bf8a77d13
Merge pull request #20023 from Veykril/push-vkqlnyttnqzl
...
Improve completions in if / while expression conditions
2025-06-17 12:01:43 +00:00
Lukas Wirth
7447db83ed
Better completion test sorting
2025-06-17 13:50:58 +02:00
Lukas Wirth
4331688e3d
Improve completions in if / while expression conditions
2025-06-17 13:50:58 +02:00
Lukas Wirth
03f1003637
chore: Start infesting ide crates with 'db lifetime
2025-06-17 10:42:38 +02:00
Ryan Mehri
b95101ce46
add qualifiers to attribute completions
2025-06-04 11:02:48 -04:00
Ryan Mehri
f1cc7c5c92
match on segments of path and some small cleanup
2025-06-04 08:30:27 -04:00
Ryan Mehri
7e8079fbad
feat: implement completion for diagnostic module
2025-06-02 20:56:20 -04:00
Ryan Mehri
fb921c3039
fix: don't duplicate must_use for functions and traits
2025-06-02 15:35:13 -04: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
Chayim Refael Friedman
6e8ad1666a
Fix postfix snippets duplicating derefs
2025-05-08 11:44:38 +03:00
Chayim Refael Friedman
70842faa4d
Still complete parentheses & method call arguments if there are existing parentheses, but they are after a newline
2025-05-08 11:05:39 +03:00
Victor
32e09de7c2
Support environment variable CARGO_MANIFEST_PATH.
2025-05-05 22:13:48 +02:00
A4-Tacks
850d122fd4
Improve let snippet
2025-05-03 17:04:11 +08:00
A4-Tacks
d922c20158
Improve the let code snippet
2025-05-03 13:15:32 +08:00