1736: Switch to `@types/vscode` and `vscode-test` r=matklad a=bkchr
The old `vscode` package is outdated and it is recommened to switch to
these two new packages. This also solves a problem of a missing `.d.ts`
for `vscode` in Nixos.
Co-authored-by: Bastian Köcher <git@kchr.de>
The old `vscode` package is outdated and it is recommened to switch to
these two new packages. This also solves a problem of a missing `.d.ts`
for `vscode` in Nixos.
1734: Strip indents and empty lines in check_apply_diagnostic_fix_from_position r=matklad a=matklad
Co-authored-by: Phil Ellison <phil.j.ellison@gmail.com>
1733: Parse arbitrarily complex `box` patterns. r=matklad a=ecstatic-morse
This fully resolves the pattern part of #1412 by enabling the parsing of complex `box` patterns such as:
```rust
let box Struct { box i, j: box Inner(box &x) } = todo!();
```
This introduces a new `ast::BoxPat` (in the mold of `ast::RefPat`) that gets translated to `hir::Pat::Missing`.
Co-authored-by: Dylan MacKenzie <ecstaticmorse@gmail.com>
Named structs can have `box` patterns that will bind to their fields.
This is similar to the behavior of the `ref` and `mut` fields, but is at
least a little bit surprising.
1721: Impl/dyn trait r=flodiebold a=flodiebold
This adds support for `impl Trait` and `dyn Trait` types as far as possible without Chalk. So we can represent them in the type system, and handle them in method resolution, but Chalk doesn't know about them yet. There's a small temporary hack here where we bypass Chalk during method resolution, so we can handle simple method calls on them and completion works.
Fixes#1608.
1723: Make sysroot use `RUST_SRC_PATH` if set r=matklad a=bkchr
Co-authored-by: Florian Diebold <flodiebold@gmail.com>
Co-authored-by: Bastian Köcher <git@kchr.de>