A4-Tacks
07f33e2b81
Fix IfExpr then branch suggest
...
- And add logic operation suggest
Example
---
In the old implementation, it always suggested conditions,
this is a lot of noise, e.g `contract_checks()~(use std::intrinsics::contract_checks) const fn() -> bool`
```rust
fn foo() {
if true {
c$0
}
}
```
2025-09-20 20:56:27 +08:00
Shoyu Vanilla (Flint)
a943034d68
Merge pull request #20702 from A4-Tacks/else-not-before-else
...
Fix `else` completion before else keyword
2025-09-20 11:57:07 +00:00
A4-Tacks
c976f9900d
Fix else completion before else keyword
...
Example
---
```rust
fn foo() {
let x = if true {
1
} el$0 else {
2
};
}
```
**Before this PR**:
```text
else~ k [LS]
else if~ k [LS]
```
**After this PR**:
```text
else if~ k [LS]
```
2025-09-19 19:59:47 +08:00
Chayim Refael Friedman
cd31e11f94
Merge pull request #20664 from ChayimFriedman2/coerce-ns
...
metrics / other_metrics (hyper-0.14.18) (push) Blocked by required conditions
metrics / build_metrics (push) Waiting to run
metrics / other_metrics (diesel-1.4.8) (push) Blocked by required conditions
metrics / other_metrics (ripgrep-13.0.0) (push) Blocked by required conditions
metrics / other_metrics (self) (push) Blocked by required conditions
metrics / other_metrics (webrender-2022) (push) Blocked by required conditions
metrics / generate_final_metrics (push) Blocked by required conditions
rustdoc / rustdoc (push) Waiting to run
fix: Port a bunch of stuff from rustc and fix a bunch of type mismatches/diagnostics
2025-09-18 00:19:30 +00:00
Lukas Wirth
aecb756876
Merge pull request #20517 from Veykril/veykril/push-wrurmtqppzus
...
fix: Only compute unstable paths on nightly toolchains for IDE features
2025-09-16 07:28:47 +00:00
Lukas Wirth
685f156fa6
fix: Only compute unstable paths on nightly toolchains for IDE features
2025-09-16 09:17:16 +02:00
Chayim Refael Friedman
7d1860807e
Port a bunch of stuff from rustc and fix a bunch of type mismatches/diagnostics
...
This started from porting coercion, but ended with porting much more.
2025-09-15 18:56:17 +03:00
A4-Tacks
d42c81e8d1
Fix extra semicolon before else in let-stmt
...
Example
---
```rust
fn main() {
let x = if true {
()
} $0 else {};
}
```
**Before this PR**:
```rust
fn main() {
let x = if true {
()
} else if $1 {
$0
}; else {};
}
```
**After this PR**:
```rust
fn main() {
let x = if true {
()
} else if $1 {
$0
} else {};
}
```
2025-09-12 20:56:59 +08:00
Shoyu Vanilla
4a8bc8db38
Fix failing tests and fill-in missing details
2025-09-10 01:43:22 +09:00
Laurențiu Nicola
a91fb2b9a1
Merge pull request #20620 from A4-Tacks/let-else-completion
...
metrics / build_metrics (push) Waiting to run
metrics / other_metrics (diesel-1.4.8) (push) Blocked by required conditions
metrics / other_metrics (hyper-0.14.18) (push) Blocked by required conditions
metrics / other_metrics (ripgrep-13.0.0) (push) Blocked by required conditions
metrics / other_metrics (self) (push) Blocked by required conditions
metrics / other_metrics (webrender-2022) (push) Blocked by required conditions
metrics / generate_final_metrics (push) Blocked by required conditions
rustdoc / rustdoc (push) Waiting to run
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
...
metrics / other_metrics (ripgrep-13.0.0) (push) Blocked by required conditions
metrics / build_metrics (push) Waiting to run
metrics / other_metrics (diesel-1.4.8) (push) Blocked by required conditions
metrics / other_metrics (hyper-0.14.18) (push) Blocked by required conditions
metrics / other_metrics (self) (push) Blocked by required conditions
metrics / other_metrics (webrender-2022) (push) Blocked by required conditions
metrics / generate_final_metrics (push) Blocked by required conditions
rustdoc / rustdoc (push) Waiting to run
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
...
metrics / other_metrics (self) (push) Blocked by required conditions
metrics / build_metrics (push) Waiting to run
metrics / other_metrics (diesel-1.4.8) (push) Blocked by required conditions
metrics / other_metrics (hyper-0.14.18) (push) Blocked by required conditions
metrics / other_metrics (ripgrep-13.0.0) (push) Blocked by required conditions
metrics / other_metrics (webrender-2022) (push) Blocked by required conditions
metrics / generate_final_metrics (push) Blocked by required conditions
rustdoc / rustdoc (push) Waiting to run
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
...
metrics / build_metrics (push) Waiting to run
metrics / other_metrics (diesel-1.4.8) (push) Blocked by required conditions
metrics / other_metrics (hyper-0.14.18) (push) Blocked by required conditions
metrics / other_metrics (ripgrep-13.0.0) (push) Blocked by required conditions
metrics / other_metrics (self) (push) Blocked by required conditions
metrics / other_metrics (webrender-2022) (push) Blocked by required conditions
metrics / generate_final_metrics (push) Blocked by required conditions
rustdoc / rustdoc (push) Waiting to run
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
...
metrics / build_metrics (push) Waiting to run
metrics / other_metrics (diesel-1.4.8) (push) Blocked by required conditions
metrics / other_metrics (hyper-0.14.18) (push) Blocked by required conditions
metrics / other_metrics (ripgrep-13.0.0) (push) Blocked by required conditions
metrics / other_metrics (self) (push) Blocked by required conditions
metrics / other_metrics (webrender-2022) (push) Blocked by required conditions
metrics / generate_final_metrics (push) Blocked by required conditions
rustdoc / rustdoc (push) Waiting to run
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 8643a858db .
2025-06-19 07:40:01 +02:00
Laurențiu Nicola
5d93e31067
Merge pull request #20025 from SoxPopuli/hide_private_imports_without_pe
...
metrics / build_metrics (push) Waiting to run
metrics / other_metrics (diesel-1.4.8) (push) Blocked by required conditions
metrics / other_metrics (hyper-0.14.18) (push) Blocked by required conditions
metrics / other_metrics (ripgrep-13.0.0) (push) Blocked by required conditions
metrics / other_metrics (self) (push) Blocked by required conditions
metrics / other_metrics (webrender-2022) (push) Blocked by required conditions
metrics / generate_final_metrics (push) Blocked by required conditions
rustdoc / rustdoc (push) Waiting to run
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