358: Add support for formatting entire document with rustfmt r=matklad a=aleksanb
Attempting to format a document when rustfmt isn't installed will result
in an error being returned to the frontend. An alternative
implementation would be returning zero replacements.
Part of https://github.com/rust-analyzer/rust-analyzer/issues/160.
Co-authored-by: Aleksander Vognild Burkow <aleksanderburkow@gmail.com>
Attempting to format a document when rustfmt isn't installed will result
in an error being returned to the frontend. An alternative
implementation would be returning zero replacements.
356: Fix a bug in char literal validation discovered through fuzzing r=matklad a=DJMcNab
We also add a Cargo.lock to the fuzzing directory, as that isn't gitignored automatically, so I imagine it should be committed.
Co-authored-by: DJMcNab <36049421+djmcnab@users.noreply.github.com>
This will really become necessary when we implement generics, but even now, it
allows us to reason 'backwards' to infer types of expressions that we didn't
understand for some reason.
We use ena, the union-find implementation extracted from rustc, to keep track of
type variables.
350: Super simple macro support r=matklad a=matklad
Super simple support for macros, mostly for figuring out how to fit them into the current architecture. Expansion is hard-coded and string based (mid-term, we should try to copy-paste macro-by-example expander from rustc).
Ideally, we should handle
* highlighting inside the macro (done)
* extend selection inside the macro
* completion inside the macro
* indexing structs, produced by the macro
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>