Asymptotically computing a set difference is faster but in the average
case we won't have more than ~10 functions. Also prefer not using hash
sets as these may yield nondeterministic results.
Implement `BindingMode` for pattern matching, so that types can be
correctly inferred using match ergonomics. The binding mode defaults to
`Move` (referred to as 'BindingMode::BindByValue` in rustc), and is
updated by automatic dereferencing of the value being matched.
981: Remove FnSig from FnDef type r=matklad a=flodiebold
It doesn't need to be in there since it's just information from the def. Another
step towards aligning Ty with Chalk's representation.
Co-authored-by: Florian Diebold <flodiebold@gmail.com>
976: Replace Display by a pretty printing trait for Ty r=matklad a=flodiebold
This allows removing the names from Adt and FnDef (and more later), as a first
step towards aligning more with chalk's Ty :)
I may have gone a bit overboard with the definition of the PrettyPrint trait...
Co-authored-by: Florian Diebold <florian.diebold@freiheit.com>
973: derive Hash for ra_hir::ModuleDef r=matklad a=pcpthm
I wanted to use `HashSet` but it seems like `Hash` derive is missing for no reason.
Co-authored-by: pcpthm <pcpthm@gmail.com>
971: Point to compiler-team repo in the readme r=matklad a=detrumi
The readme still links to the old repo, which redirects to the new one
Co-authored-by: Wilco Kusee <wilcokusee@gmail.com>
959: Retrieve current working directory from workspace r=matklad a=LDSpits
This PR improves the way the language client retrieves the current working directory by using the VSCode workspace API to get the path to the currently open directory.
If we find more than one directory we show a warning that "multi root workspaces are not supported yet" and pick the root path.
Any feedback is appreciated 😄fixes#945
Co-authored-by: Lucas Spits <spits.lucas@gmail.com>
957: Fix and simplify "rustc-watch" problem matcher r=vemoo a=vemoo
Cargo watch now always ends with "[Finished running ..." and includes some extra info. Make the pattern only match "[Finished running".
Also add "cargo watch" and "cargo watch tests" that use the "rustc-watch" problem matcher.
Change the "Build Lsp" to do "cargo check" because that's faster, and I think enought in this case, and make it use "rustc" problem matcher from the extension.
Co-authored-by: Bernardo <berublan@gmail.com>
953: Don't default publishDecorations and showWorkspaceLoaded to true on the server r=matklad a=flodiebold
If the client doesn't specify these explicitly, that very likely means it
doesn't know about them and so we shouldn't send them. In particular, the recent
change to this default caused decorations to be sent to emacs, resulting in a
lot of warning spam.
Co-authored-by: Florian Diebold <florian.diebold@freiheit.com>
If the client doesn't specify this explicitly, that very likely means it doesn't
know about it and so we shouldn't send decorations. In particular, the recent
change to this default caused decorations to be sent to emacs, resulting in a
lot of warning spam.