A4-Tacks
842f9650bc
Add complex tests for assist generate_fn_type_alias
2025-12-09 12:34:35 +08:00
A4-Tacks
4fb242e4bf
Fix make::unnamed_param result a untyped_param
...
- Add `make::untyped_param`
- Add some basic make tests
Example
---
```rust
make::unnamed_param(make::ty("Vec<T>")),
```
**Before this PR**
```text
PARAM@0..4
IDENT_PAT@0..4
NAME@0..4
IDENT@0..4 "Vec"
```
**After this PR**
```text
PARAM@0..6
PATH_TYPE@0..6
PATH@0..6
PATH_SEGMENT@0..6
NAME_REF@0..3
IDENT@0..3 "Vec"
GENERIC_ARG_LIST@3..6
L_ANGLE@3..4 "<"
TYPE_ARG@4..5
PATH_TYPE@4..5
PATH@4..5
PATH_SEGMENT@4..5
NAME_REF@4..5
IDENT@4..5 "T"
R_ANGLE@5..6 ">"
```
---
Assist: `Generate a type alias for function with unnamed params`
```rust
fn foo$0(x: Vec<i32>) {}
```
**Before this PR**
```rust
type FooFn = fn(Vec);
fn foo(x: Vec<i32>) {}
```
**After this PR**
```rust
type FooFn = fn(Vec<i32>);
fn foo(x: Vec<i32>) {}
```
2025-11-16 17:34:54 +08:00
Lukas Wirth
4bf516ee5a
Merge pull request #20973 from Natural-selection1/demorgan
...
rustdoc / rustdoc (push) Has been cancelled
metrics / build_metrics (push) Has been cancelled
metrics / generate_final_metrics (push) Has been cancelled
metrics / other_metrics (ripgrep-13.0.0) (push) Has been cancelled
metrics / other_metrics (self) (push) Has been cancelled
metrics / other_metrics (webrender-2022) (push) Has been cancelled
metrics / other_metrics (diesel-1.4.8) (push) Has been cancelled
metrics / other_metrics (hyper-0.14.18) (push) Has been cancelled
fix demorgan assist to handle method call
2025-11-06 14:20:44 +00:00
Hegui Dai
06668b6e8c
refactor
2025-11-06 21:44:30 +08:00
chiri
c9b5683467
Move safe computation out of unsafe block
2025-11-06 11:37:45 +03:00
Hegui Dai
e9b8265173
fix demorgan assist to handle method call
2025-11-05 20:14:52 +08:00
Shoyu Vanilla
c7c9e25971
fix: Fix panicking while resolving callable sigs for AsyncFnMut
2025-11-05 01:00:09 +09:00
Laurențiu Nicola
51af7a37c5
Merge pull request #20960 from rust-lang/rustc-pull
...
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
minor: Rustc pull update
2025-11-04 08:18:22 +00:00
Laurențiu Nicola
c00e22df9b
Fix test URL
2025-11-04 10:09:45 +02:00
Chayim Refael Friedman
7bd9b76bd2
Merge pull request #20966 from ChayimFriedman2/fix-test-name
...
minor: Fix test name
2025-11-04 08:07:36 +00:00
Chayim Refael Friedman
2b9591efae
Fix test name
2025-11-04 09:58:29 +02:00
Shoyu Vanilla (Flint)
c46279da2f
Merge pull request #20565 from A4-Tacks/conv-range-for-to-while
...
Add ide-assist: convert_range_for_to_while
2025-11-04 05:59:34 +00:00
A4-Tacks
180a5e23d3
Add dynamic assistant description
2025-11-04 13:50:09 +08:00
A4-Tacks
8549afe4a6
Add ide-assist: convert_range_for_to_while
...
Convert for each range into while loop.
```rust
fn foo() {
$0for i in 3..7 {
foo(i);
}
}
```
->
```rust
fn foo() {
let mut i = 3;
while i < 7 {
foo(i);
i += 1;
}
}
```
2025-11-04 13:31:41 +08:00
Shoyu Vanilla (Flint)
43df584557
Merge pull request #20961 from A4-Tacks/more-in-value
...
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 more expression to 'in_value'
2025-11-04 04:35:54 +00:00
Lukas Wirth
132d3338f4
Merge pull request #20963 from ShoyuVanilla/lit-suffix
...
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: Expand literals with wrong suffixes into `LitKind::Err`
2025-11-03 20:18:32 +00:00
Shoyu Vanilla
f09b0a89a4
fix: Canonicalize custom-target.json paths when fetching sysroot metadata
2025-11-04 03:00:29 +09:00
Shoyu Vanilla
a0217d8311
fix: Expand literals with wrong suffixes into LitKind::Err
2025-11-04 02:08:33 +09:00
A4-Tacks
45912a9693
Add more expression to 'in_value'
...
When completing some expressions, it is almost always expected to have a non unit value
- ArrayExpr
- ParenExpr
- BreakExpr
- ReturnExpr
- PrefixExpr
- FormatArgsArg
- RecordExprField
- BinExpr (rhs only)
- IndexExpr (inside index only)
Example
---
```rust
fn main() {
return $0;
}
```
**Before this PR**
```rust
fn main() {
return if $1 {
$0
};
}
```
**After this PR**
```rust
fn main() {
return if $1 {
$2
} else {
$0
};
}
```
2025-11-03 21:05:06 +08:00
Shoyu Vanilla (Flint)
00b627daf2
Merge pull request #20957 from A4-Tacks/blanket-assoc-items
...
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 missing other assoc items for generate_blanket_trait_impl
2025-11-03 06:00:25 +00:00
The rustc-josh-sync Cronjob Bot
ae9f97c299
Merge ref 'c5dabe8cf798' from rust-lang/rust
...
Pull recent changes from https://github.com/rust-lang/rust via Josh.
Upstream ref: c5dabe8cf798123087d094f06417f5a767ca73e8
Filtered ref: 3214048a4d
Upstream diff: fb24b04b09...c5dabe8cf7
This merge was created using https://github.com/rust-lang/josh-sync .
2025-11-03 04:20:09 +00:00
Jakub Beránek
f0ff861dca
Generalize branch references to HEAD
2025-11-02 11:15:55 +01:00
A4-Tacks
c9d7a8aaf2
Fix missing other assoc items for generate_blanket_trait_impl
...
- And migrate `edit_in_place::Indent` to `edit::AstNodeEdit`,
because edit_in_place use ted
Example
---
```rust
trait $0Foo<T: Send> {
type X: Sync;
fn foo(&self, x: Self::X) -> T;
fn print_foo(&self) {
println!("{}", self.foo());
}
}
```
**Before this PR**
```rust
impl<T: Send, T1: ?Sized> Foo<T> for $0T1 {
fn foo(&self, x: Self::X) -> T {
todo!()
}
}
```
**After this PR**
```rust
impl<T: Send, T1: ?Sized> Foo<T> for $0T1 {
type X: Sync;
fn foo(&self, x: Self::X) -> T {
todo!()
}
}
```
2025-11-02 13:35:54 +08:00
Shoyu Vanilla (Flint)
bacc5bbd30
Merge pull request #20920 from ShoyuVanilla/target-dirs
...
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
autopublish / publish (push) Has been cancelled
release / dist (aarch64-apple-darwin) (push) Has been cancelled
release / dist (x86_64-apple-darwin) (push) Has been cancelled
release / dist (aarch64-unknown-linux-gnu) (push) Has been cancelled
release / dist (arm-unknown-linux-gnueabihf) (push) Has been cancelled
release / dist (x86_64-unknown-linux-gnu) (push) Has been cancelled
release / dist (aarch64-pc-windows-msvc) (push) Has been cancelled
release / dist (x86_64-pc-windows-msvc) (push) Has been cancelled
release / dist (i686-pc-windows-msvc) (push) Has been cancelled
release / dist (x86_64-unknown-linux-musl) (push) Has been cancelled
release / publish (push) Has been cancelled
fix: Resolve `target-dir` more precisely
2025-11-02 05:17:40 +00:00
Chayim Refael Friedman
c85e57e9b6
Fix building with DHAT
...
Maybe we need to check it on CI?
2025-11-01 18:50:01 +02:00
Shoyu Vanilla (Flint)
2e2e3ebec9
Merge pull request #20927 from ChayimFriedman2/dhat
...
metrics / build_metrics (push) Has been cancelled
rustdoc / rustdoc (push) Has been cancelled
metrics / other_metrics (diesel-1.4.8) (push) Has been cancelled
metrics / other_metrics (hyper-0.14.18) (push) Has been cancelled
metrics / other_metrics (ripgrep-13.0.0) (push) Has been cancelled
metrics / other_metrics (self) (push) Has been cancelled
metrics / other_metrics (webrender-2022) (push) Has been cancelled
metrics / generate_final_metrics (push) Has been cancelled
feat: Support memory profiling with dhat
2025-10-31 07:08:23 +00:00
Jacob Pratt
ea9a188f1e
Fix typos, backtick errors/omissions
2025-10-31 00:41:27 -04:00
Shoyu Vanilla
3d636a6ca6
fix: Do not make false positive syntax errors on frontmatter
2025-10-31 00:45:26 +09:00
Lukas Wirth
00ace813d3
Merge pull request #20366 from Veykril/push-lmmtrpptrxom
...
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
minor: Cleanup `map_rust_child_diagnostics` a bit
2025-10-30 10:59:06 +00:00
Lukas Wirth
823d7197a0
minor: Cleanup map_rust_child_diagnostics a bit
2025-10-29 13:12:21 +01:00
Lukas Wirth
769ebafdc6
Merge pull request #20934 from Veykril/veykril/push-qtzmsqkzntpo
...
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: Improve error recovery when parsing malformed function return types
2025-10-29 12:10:01 +00:00
Lukas Wirth
47c5af2f16
fix: Improve error recovery when parsing malformed function return types
2025-10-29 12:33:35 +01:00
Kirill Bulatov
7f2bac82c6
Show proper async function signatures in the signature help
...
Co-authored-by: Lukas Wirth <lukas@zed.dev>
2025-10-28 21:46:55 +02:00
Shoyu Vanilla (Flint)
5d905576d4
Merge pull request #20930 from ChayimFriedman2/builtin-res-block
...
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: Fix handling of blocks modules that are not the root module
2025-10-28 14:16:33 +00:00
Chayim Refael Friedman
1ba3165b81
Support memory profiling with dhat
...
Unfortunately, this requires a custom build of r-a, and it's quite slow.
2025-10-28 13:00:53 +02:00
Chayim Refael Friedman
44227800c6
Fix handling of blocks modules that are not the root module
2025-10-28 12:57:26 +02:00
Shoyu Vanilla (Flint)
6155980340
Merge pull request #20906 from ChayimFriedman2/opaques-ns
...
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
fix: Properly support opaques
2025-10-28 08:03:59 +00:00
Shoyu Vanilla (Flint)
1e1c00f8d8
Merge pull request #20915 from A4-Tacks/is-method-with-while-let
...
Fix not applicable on while for replace_is_method_with_if_let_method
2025-10-28 07:32:48 +00:00
Shoyu Vanilla (Flint)
b50af95188
fix: Canonicalize flycheck output path
2025-10-28 15:49:38 +09:00
Chayim Refael Friedman
4fddcc6d57
Provide an option to not show derives near the ADT for "Goto Implementations" or "Implementations" codelens
...
I don't do it by default, for three reasons: (1) it's more expensive, (2) I actually quite like seeing the derives, and they may expand to no impl/more than one impl, (3) if #19130 will ever be merged this will become even more useful.
Even a config might be too much, but it was fun and easy to code so I did that.
2025-10-28 08:34:16 +02:00
Lukas Wirth
3e2e8a8771
perf: Reduce client_commands allocations in proto conversion
2025-10-27 23:48:20 +01:00
Chayim Refael Friedman
c8472a7d9c
Merge pull request #20921 from ChayimFriedman2/specialization-ns2
...
Avoid calling `specializes()` query on crates that do not define `#![feature(specialization)]`
2025-10-27 22:31:29 +00:00
Chayim Refael Friedman
727d2aae89
Avoid calling specializes() query on crates that do not define #![feature(specialization)]
...
To save memory.
2025-10-28 00:22:44 +02:00
Shoyu Vanilla
5f3539a566
fix: Resolve target-dir more precisely
2025-10-28 03:54:00 +09:00
Chayim Refael Friedman
4c709bad14
Consider all matches for flyimport even when searched with a qualifier
2025-10-27 19:26:27 +02:00
Chayim Refael Friedman
f7a13f0a41
Merge pull request #20369 from ChayimFriedman2/rename-self2
...
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
feat: When renaming `self` to other name, change callers method method call syntax to assoc fn syntax
2025-10-27 15:38:33 +00:00
Chayim Refael Friedman
9d038a94c2
When renaming self to other name, change callers method method call syntax to assoc fn syntax
2025-10-27 17:27:18 +02:00
Chayim Refael Friedman
537b31b55a
Properly support opaques
...
By letting the solver take control of them (reveal them when needed and define them when needed), by providing them in the `TypingMode` plus few helpers.
2025-10-27 17:17:57 +02:00
A4-Tacks
1621bd5b7c
Fix not applicable on while for replace_is_method_with_if_let_method
...
Example
---
```rust
fn main() {
let mut x = Some(1);
while x.is_som$0e() { x = None }
}
```
**Before this PR**
Assist not applicable
**After this PR**
```rust
fn main() {
let mut x = Some(1);
while let Some(${0:x1}) = x { x = None }
}
```
2025-10-27 15:30:32 +08:00
Chayim Refael Friedman
049767e6fa
Merge pull request #20914 from ShoyuVanilla/next-solver-tests
...
release / dist (aarch64-apple-darwin) (push) Has been cancelled
release / dist (aarch64-pc-windows-msvc) (push) Has been cancelled
release / dist (x86_64-apple-darwin) (push) Has been cancelled
release / dist (aarch64-unknown-linux-gnu) (push) Has been cancelled
release / dist (arm-unknown-linux-gnueabihf) (push) Has been cancelled
release / dist (x86_64-unknown-linux-gnu) (push) Has been cancelled
release / dist (x86_64-pc-windows-msvc) (push) Has been cancelled
release / dist (i686-pc-windows-msvc) (push) Has been cancelled
autopublish / publish (push) Has been cancelled
release / dist (x86_64-unknown-linux-musl) (push) Has been cancelled
rustdoc / rustdoc (push) Has been cancelled
metrics / build_metrics (push) Has been cancelled
release / publish (push) Has been cancelled
metrics / other_metrics (webrender-2022) (push) Has been cancelled
metrics / other_metrics (diesel-1.4.8) (push) Has been cancelled
metrics / other_metrics (hyper-0.14.18) (push) Has been cancelled
metrics / other_metrics (ripgrep-13.0.0) (push) Has been cancelled
metrics / other_metrics (self) (push) Has been cancelled
metrics / generate_final_metrics (push) Has been cancelled
Add regression tests for some fixed `A-ty` issues
2025-10-26 17:41:19 +00:00