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
f8ae8975a6
Merge pull request #20528 from ShoyuVanilla/nightly-zscript
...
fix: Masquerade as nightly cargo when invoking flycheck with `-Zscript`
2025-08-25 19:12:47 +00:00
Chayim Refael Friedman
fd77af3a78
Don't map Chalk's Normalize
to next solver's NormalizesTo
...
`NormalizesTo` is a private predicate that should not be used outside the solver. For normalization, rustc uses `AliasRelate`, so replace with that.
2025-08-25 20:56:45 +03:00
Chayim Refael Friedman
1ff80eefe1
Normalize all types when finishing inference
...
The new solver does not eagerly normalize, but things after inference expect types to be normalized. rustc does the same.
Also, I'm afraid other things in r-a don't expect results of the solver to be unnormalized. We'll need to handle that.
2025-08-25 20:23:18 +03:00
Chayim Refael Friedman
1c8a07cfd6
Cache trait solving across queries in the same revision
...
Caching trait solving can do a lot to speed. Unfortunately it also consume a huge amount of memory. Therefore, as part of the migration to the new solver Jack Huey disabled caching of trait solving (he made the query transparent).
The PR proposes a middle ground: do cache trait solving, but only for the same revision. This allows us to be safe because during a revision the inputs cannot change.
The result is hopefully much better performance to features that tend to do a bulk of trait solving, and also repeat the same query (e.g. inference then IDE features).
There is another limitation: results are only cached in the same thread, to remove the need for synchronization which will be expensive. More measurements are required to check whether it's better to use a synchronized global cache, or maybe stay with a thread-local cache but batch multiple feature requests (highlighting, inlay hints etc.) of the same file to the same thread.
Alongside the actual cache we store the revision, because we need to verify it (we can't eagerly clear caches when incrementing the revision), and also the address of the db to prevent multiple dbs from interleaving (this is mostly relevant in tests, although injected highlighting also uses a new db, therefore maybe it's better to move it to a separate thread).
This "games" analysis-stats to both be way faster and use way more memory; the former is because analysis-stats doesn't increment revisions, therefore all queries share the cache and hit ratio is way too good, the latter is because analysis-stats doesn't increment revisions and therefore the cache isn't cleared. Both are not representative of a typical IDE scenario.
2025-08-25 17:17:31 +03:00
A4-Tacks
55b1ddbcc3
Fix ExprStmt delete semicolon for toggle_macro_delimiter
2025-08-25 16:45:12 +08:00
Shoyu Vanilla (Flint)
58a7de6c4d
Merge pull request #20529 from emmanuel-ferdman/master
...
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 rust-analyzer-contributors reference
2025-08-24 15:23:18 +00:00
Emmanuel Ferdman
16f1fd8676
Fix rust-analyzer-contributors reference
...
Signed-off-by: Emmanuel Ferdman <emmanuelferdman@gmail.com>
2025-08-24 08:04:00 -07:00
Shoyu Vanilla
1c8fd6af24
fix: Masquerade as nightly cargo when invoking flycheck with -Zscript
2025-08-24 23:17:23 +09:00
Shoyu Vanilla (Flint)
db7b3b1b91
Merge pull request #20523 from ChayimFriedman2/opaque-generics
...
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 opaque generics
2025-08-24 06:59:38 +00:00
Chayim Refael Friedman
03173a7ec7
Fix opaque generics
...
The parent generics were incorrectly not considered for TAIT.
I'm not convinced we should follow rustc here, also there are items (opaques) with more than 1 parent (opaque -> fn/type alias -> impl/trait) and I'm not sure we properly account for that in all places, but for now I left it as-is.
Also fix a bug where lifetimes' indices were incorrect when there is a self param (they started from 0 instead of 1).
2025-08-24 08:49:40 +03: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
35369557a6
Merge pull request #20512 from A4-Tacks/arith-op-not-on-selected
...
replace_arith_op not applicable on selected
2025-08-24 00:17:09 +00:00
A4-Tacks
0fe2d7ffa1
replace_arith_op not applicable on selected
2025-08-24 07:57:50 +08:00
Chayim Refael Friedman
eaf71411a9
Add an option to remove reborrows from adjustment inlay hints
...
Reborrows are consecutive deref then ref. Make it the default because reborrows are mostly useless to the programmer.
Also rename `rust-analyzer.inlayHints.expressionAdjustmentHints.enable: "reborrow"` to `rust-analyzer.inlayHints.expressionAdjustmentHints.enable: "borrows"`, as it's not about reborrows but about any ref/deref and it's confusing with the new setting.
2025-08-24 02:26:37 +03: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
Chayim Refael Friedman
71662e4c65
Merge pull request #20518 from A4-Tacks/fix-else-in-in-let
...
Fix `else` completion in `let _ = if x {} $0`
2025-08-23 22:07:13 +00:00
Chayim Refael Friedman
413ed5a361
Merge pull request #20511 from A4-Tacks/fix-conv-int-lit-on-selected
...
convert_integer_literal not on selected
2025-08-23 22:03:17 +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
A4-Tacks
5f8cfeb3f4
fix: convert_integer_literal not on selected
...
`convert_integer_literal` can only convert the first literal,
it is not reasonable to apply it when selected
Example
---
```rust
fn main() {
$01+1$0;
}
```
**Assist old outputs**:
```
Convert 1 to 0b1
Convert 1 to 0o1
Convert 1 to 0x1
Replace arithmetic with call to checked_*
Replace arithmetic with call to saturating_*
Replace arithmetic with call to wrapping_*
Extract into variable
Extract into constant
Extract into static
Extract into function
```
**Assist this PR outputs**:
```
Replace arithmetic with call to checked_*
Replace arithmetic with call to saturating_*
Replace arithmetic with call to wrapping_*
Extract into variable
Extract into constant
Extract into static
Extract into function
```
2025-08-22 17:13:30 +08:00
Shoyu Vanilla (Flint)
e6cd085099
Merge pull request #20506 from Veykril/veykril/push-xlytslrrylzq
...
rustdoc / rustdoc (push) Has been cancelled
metrics / build_metrics (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
Fix panic in syntax_highlighting
2025-08-22 08:14:02 +00:00
Lukas Wirth
0914f78f23
Fix panic in syntax_highlighting
2025-08-22 09:00:25 +02:00
A4-Tacks
f5f797e2d3
Fix indent for move_guard_to_arm_body
...
Input:
```rust
fn main() {
match 92 {
x $0if true
&& true
&& true =>
{
{
false
}
},
_ => true
}
}
```
Old output:
```rust
fn main() {
match 92 {
x =>
if true
&& true
&& true {
{
{
false
}
}
},
_ => true
};
}
```
This PR fixed:
```rust
fn main() {
match 92 {
x => if true
&& true
&& true {
{
{
false
}
}
},
_ => true
}
}
```
2025-08-22 11:43:03 +08:00
Chayim Refael Friedman
14872a5332
Merge pull request #20504 from ShoyuVanilla/ethereum-madness
...
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: Infinite recursion while lowering assoc type bounds from supertraits
2025-08-21 20:45:29 +00:00
Shoyu Vanilla
80ce520660
fix: Infinite recursion while lowering assoc type bounds from supertraits
2025-08-22 05:24:33 +09:00
Chayim Refael Friedman
9577ca7065
Merge pull request #20502 from ChayimFriedman2/attach-db-3
...
Remove unnecessary `salsa::attach()` calls
2025-08-21 20:03:59 +00:00
Chayim Refael Friedman
df375b0855
Remove unnecessary salsa::attach()
calls
2025-08-21 22:40:58 +03:00
Chayim Refael Friedman
a161fd6bc1
Merge pull request #20497 from ChayimFriedman2/symbols-attach2
...
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
Attach the DB when mapping the result of `world_symbols()`
2025-08-21 05:25:40 +00:00
Chayim Refael Friedman
7a27a27f4b
Attach the DB when mapping the result of world_symbols()
...
We call `try_to_nav()` there.
2025-08-21 08:06:43 +03:00
Chayim Refael Friedman
75ce5dc2c9
Merge pull request #20496 from ChayimFriedman2/symbols-attach
...
Attach the DB in symbol queries
2025-08-21 04:34:26 +00:00
Chayim Refael Friedman
243d158e88
Attach the DB in symbol queries
2025-08-21 07:14:55 +03:00
Laurențiu Nicola
f9e402dfcb
Merge pull request #20483 from lumiscosity/optimize-icon
...
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
Optimize editor plugin icon
2025-08-20 04:07:10 +00:00
lumiscosity
7c8b75344c
Optimize icon
...
Losslessly optimizes the icon with:
```
oxipng -o max -a -s
oxipng -o max --zopfli -a -s
```
2025-08-19 11:41:58 +02:00
Shoyu Vanilla (Flint)
58bbdec731
Merge pull request #20447 from lcnr/typing-mode
...
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
user facing code should use not use `PostAnalysis`
2025-08-19 06:53:17 +00:00
lcnr
1d4f709e60
user facing code should use not use PostAnalysis
2025-08-19 08:24:34 +02:00
Lukas Wirth
a905e3b21b
Merge pull request #20470 from rust-lang/veykril/push-wppxsntzqtou
...
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
Auto-attach database in `Analysis` calls
2025-08-18 08:14:07 +00:00
Lukas Wirth
aed0fec1a9
Auto-attach database in Analysis
calls
2025-08-18 09:52:23 +02:00
Shoyu Vanilla (Flint)
becf04b67a
Merge pull request #20442 from ChayimFriedman2/unqualify
...
fix: Only import the item in "Unqualify method call" if needed
2025-08-18 06:24:35 +00:00
Shoyu Vanilla (Flint)
80bc952871
Merge pull request #20454 from jackh726/next-trait-solver-next
...
metrics / generate_final_metrics (push) Blocked by required conditions
metrics / other_metrics (webrender-2022) (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 (self) (push) Blocked by required conditions
rustdoc / rustdoc (push) Waiting to run
Convert some things from chalk_ir types to rustc_type_ir types
2025-08-17 16:23:17 +00:00
jackh726
596a6bf6be
Remove fixme comment
2025-08-17 16:04:50 +00:00
jackh726
3ceaf806f6
Add FIXME in named_associated_type_shorthand_candidates
2025-08-17 16:04:50 +00:00
jackh726
33cc8609dc
Add fixme to associated_ty_item_bounds
2025-08-17 16:04:50 +00:00
jackh726
ec26d9f48a
Update fixme
2025-08-17 16:04:50 +00:00
jackh726
cdf51f28f4
Add new_empty_tuple
2025-08-17 16:04:50 +00:00
jackh726
84388ceb0e
Remove a bunch of stuff from chalk_db
2025-08-17 16:04:50 +00:00
jackh726
766e6b58ad
Use impl_trait_ns in Impl::trait_ref
2025-08-17 16:04:50 +00:00
jackh726
e979349978
Switch TraitRef in hir::TraitRef to next solver
2025-08-17 16:04:50 +00:00
jackh726
7f0ec8b69f
Replace layout_of_ty with layout_of_ty_ns
2025-08-17 16:04:50 +00:00