11639: internal: Re-arrange ide_db modules r=Veykril a=Veykril
Thins out the `helpers` module by giving some items more appropriate places to live
bors r+
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
11598: feat: Parse destructuring assignment r=Veykril a=ChayimFriedman2
Part of #11532.
Lowering is not as easy and may not even be feasible right now as it requires generating identifiers: `(a, b) = (b, a)` is desugared into
```rust
{
let (<gensym_a>, <gensym_b>) = (b, a);
a = <gensym_a>;
b = <gensym_b>;
}
```
rustc uses hygiene to implement that, but we don't support hygiene yet.
However, I think parsing was the main problem as lowering will just affect type inference, and while `{unknown}` is not nice it's much better than a syntax error.
I'm still looking for the best way to do lowering, though.
Fixes#11454.
Co-authored-by: Chayim Refael Friedman <chayimfr@gmail.com>
11574: Small refactor text edit 2nd r=Veykril a=HansAuger
Some more changes to text_edit. Basic idea is to make `Indel` implement `PartialOrd` to take advantage of some sweet sweet iteration, most notably itertool's `merge`.
Co-authored-by: Moritz Vetter <mv@3yourmind.com>
11623: fix: Add type variable table to InferenceTableSnapshot r=flodiebold a=tysg
Fixes#11601.
I observed that removing the `rollback` line in 6fc3d3aa4c fixes the issue.
Looking at the stacktrace, I believe not restoring `type_variable_table` causes `type_variable_table` and `var_unification_table` to go out of sync, then when `hir_ty::infer::unify::InferenceTable::new_var` tries to extend `type_variable_table` to be the same length as `var_unification_table`, problems will arise.
However, I cannot pinpoint exactly how or where the vector capacity overflow happens, so my understanding might not be correct after all.
Co-authored-by: Tianyi Song <42670338+tysg@users.noreply.github.com>
11622: show variadic args in hover function signature r=Veykril a=euclio
The current behavior is to ignore the ellipsis.
Co-authored-by: Andy Russell <arussell123@gmail.com>
11595: fix: lower string literals with actual value instead of default r=lnicola a=tysg
Fixes#11582. Some questions below in the code review section.
Co-authored-by: Tianyi Song <42670338+tysg@users.noreply.github.com>
11140: Preserve order of generic args r=HKalbasi a=HKalbasi
https://github.com/rust-lang/rust/pull/90207 removed order restriction of generic args, i.e. const generics can now become before of type generics. We need to preserve this order to analyze correctly, and this PR does that.
It also simplifies implementation of const generics a bit IMO.
Implementing default generics the same problem of #7434, we need lower them to body and then evaluate them.
Co-authored-by: hkalbasi <hamidrezakalbasi@protonmail.com>