Commit graph

4343 commits

Author SHA1 Message Date
Aleksey Kladov
7e02aa0eff migrate ra_fmt to new rowan 2019-07-19 13:16:24 +03:00
Aleksey Kladov
08fd402ef2 migrate mbe to the new rowan 2019-07-19 13:16:24 +03:00
Aleksey Kladov
d402974aa0 migrate ra_syntax to the new rowan API 2019-07-19 13:16:24 +03:00
bors[bot]
58d4983ba5 Merge #1548
1548: use Parse in mbe r=matklad a=matklad



Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2019-07-18 20:19:35 +00:00
Aleksey Kladov
df33e7685b use Parse in mbe 2019-07-18 23:19:04 +03:00
Aleksey Kladov
a6224f3620 make Parse generic 2019-07-18 22:55:04 +03:00
bors[bot]
abe72424a6 Merge #1547
1547: cleanup imports r=matklad a=matklad



Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2019-07-18 17:17:01 +00:00
Aleksey Kladov
1edec77e58 cleanup imports 2019-07-18 20:16:33 +03:00
bors[bot]
092936f20a Merge #1546
1546: prettier colors r=matklad a=matklad



Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2019-07-18 16:57:49 +00:00
Aleksey Kladov
2c4c233ba8 prettier colors 2019-07-18 19:57:13 +03:00
bors[bot]
8a6d270ecc Merge #1537
1537: Less magic completions r=matklad a=marcogroppo

Restrict `if`, `not` and `while` postfix magic completions to boolean expressions and expressions of an unknown type.

(this may be controversial, marking as draft for this reason)

See the discussion in #1526.

Co-authored-by: Marco Groppo <marco.groppo@gmail.com>
2019-07-18 16:30:19 +00:00
bors[bot]
7b2ab597bd Merge #1544
1544: Highlight mutable variables differently r=matklad a=viorina

![Screenshot from 2019-07-18 19-04-57](https://user-images.githubusercontent.com/6714973/61473539-3f5d3000-a98f-11e9-99ec-a4115b2ba66b.png)


Co-authored-by: Ekaterina Babshukova <ekaterina.babshukova@yandex.ru>
2019-07-18 16:18:12 +00:00
Ekaterina Babshukova
4abe03879b highlight mutable variables differently 2019-07-18 18:52:50 +03:00
bors[bot]
a15a278308 Merge #1543
1543: use more correct phantom types for ptrs r=matklad a=matklad



Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2019-07-18 15:13:57 +00:00
Aleksey Kladov
0fb4b896e2 use more correct phantom types for ptrs 2019-07-18 18:13:32 +03:00
Marco Groppo
d1608538de Restrict some postfix completions to bool and unknown expr.
Restrict `if` and `while` postfix completions to boolean expressions and
expressions of an unknown type.
2019-07-17 21:02:36 +02:00
bors[bot]
517692de43 Merge #1538
1538: jemallocator 0.3 r=matklad a=kjeremy



Co-authored-by: Jeremy A. Kolb <jkolb@ara.com>
2019-07-17 15:06:48 +00:00
Jeremy A. Kolb
5e9198f809 jemallocator 0.3 2019-07-17 10:58:17 -04:00
bors[bot]
c7ceea82a5 Merge #1536
1536: Add "Run" lens for binary runnables r=matklad a=SomeoneToIgnore

Add an easy way to launch the different `main` methods from VS Code:

Before:
![image](https://user-images.githubusercontent.com/2690773/61294531-b0111a80-a7de-11e9-856a-eedce52f883f.png)

After:
![image](https://user-images.githubusercontent.com/2690773/61294556-bef7cd00-a7de-11e9-9fbd-cb5076e0b1b6.png)

I've decided to omit the ️`▶️` symbol (as done for benches) since it looks a bit weird to me, but here's the version with it, just to compare:
![image](https://user-images.githubusercontent.com/2690773/61294597-dafb6e80-a7de-11e9-8f08-b513b8902ef5.png)




Co-authored-by: Kirill Bulatov <mail4score@gmail.com>
2019-07-16 12:44:24 +00:00
Kirill Bulatov
1037242e6e Add "Run" lens for binary runnables 2019-07-16 15:02:11 +03:00
bors[bot]
6deeabf686 Merge #1535
1535: fix: spelling r=matklad a=martingronlund



Co-authored-by: Martin Grönlund <3044707+martingronlund@users.noreply.github.com>
2019-07-15 21:44:28 +00:00
Martin Grönlund
23ac4cd636
fix: spelling 2019-07-15 21:41:43 +02:00
bors[bot]
8eb5a1556d Merge #1534
1534: cargo update r=kjeremy a=kjeremy



Co-authored-by: kjeremy <kjeremy@gmail.com>
2019-07-15 19:08:48 +00:00
kjeremy
1fcc002677 cargo update 2019-07-15 15:07:11 -04:00
bors[bot]
8de56ec43e Merge #1532
1532: Some refactorings & update Chalk r=flodiebold a=flodiebold

This does some of the renamings proposed in #1515, refactors `InferenceContext` a bit, and does a Cargo update, including fixing the build since I broke it by already pushing an updated branch to my Chalk fork 😞 
We could also consider switching back to Chalk master; I couldn't reproduce any hangs with the floundering even on the rustc repo...

Co-authored-by: Florian Diebold <flodiebold@gmail.com>
2019-07-15 06:50:36 +00:00
Florian Diebold
c8284d8424 Switch to Chalk master, without fuel 2019-07-15 08:49:55 +02:00
Florian Diebold
dcb0c02e3a Remove blacklist, instead mark Sized as non-enumerable
This seems to be enough to prevent hanging in rust-analyzer, Chalk and the rustc
repo.
2019-07-15 08:49:55 +02:00
Florian Diebold
e2bce9e7eb Cargo update, including updating Chalk 2019-07-14 18:22:47 +02:00
Florian Diebold
1e60ba8927 Have InferenceContext contain an InferenceResult instead of duplicating all fields 2019-07-14 18:22:47 +02:00
Florian Diebold
0a20770f46 Some renamings for clarity 2019-07-14 18:22:47 +02:00
bors[bot]
c4e2e36e4c Merge #1528
1528: More resolution modules with attribute path r=matklad a=andreevlex

#1211

Co-authored-by: Alexander Andreev <andreevlex.as@gmail.com>
2019-07-14 07:24:29 +00:00
Alexander Andreev
9c75f30272 Fixed request comments 2019-07-14 09:24:18 +03:00
Alexander Andreev
22b863c534 Fixed comments 2019-07-13 21:51:20 +03:00
Alexander Andreev
1f0e9c149f More resolution modules with attribute path
#1211
2019-07-13 21:26:04 +03:00
bors[bot]
f1bfa8fc72 Merge #1525
1525: Complete fields in enum variants r=matklad a=viorina



Co-authored-by: Ekaterina Babshukova <ekaterina.babshukova@yandex.ru>
2019-07-12 17:33:28 +00:00
Ekaterina Babshukova
2a1e11b36f complete fields in enum variants 2019-07-12 20:31:49 +03:00
bors[bot]
8bb81d7418 Merge #1524
1524: make Parse fields private r=matklad a=matklad



Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2019-07-12 16:42:06 +00:00
Aleksey Kladov
deab4caa7b make Parse fields private
this is in preparation for the new rowan API
2019-07-12 19:41:13 +03:00
bors[bot]
2e466bb365 Merge #1523
1523: account for dependencies when showing memory usage r=matklad a=matklad



Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2019-07-12 15:05:28 +00:00
Aleksey Kladov
e40494c6c1 account for dependencies when showing memory usage 2019-07-12 18:04:48 +03:00
bors[bot]
48f90a9e3f Merge #1522
1522: Bump lodash from 4.17.11 to 4.17.14 in /editors/code r=matklad a=dependabot[bot]

Bumps [lodash](https://github.com/lodash/lodash) from 4.17.11 to 4.17.14.
<details>
<summary>Commits</summary>

- [`be87d30`](be87d30394) Bump to v4.17.14.
- [`a6fe6b1`](a6fe6b1e17) Rebuild lodash and docs.
- [`e371828`](e37182845f) Bump to v4.17.13.
- [`357e899`](357e899e68) Rebuild lodash and docs.
- [`fd9a062`](fd9a062d57) Bump to v4.17.12.
- [`e77d681`](e77d68121f) Rebuild lodash and docs.
- [`629d186`](629d186579) Update OpenJS references.
- [`2406eac`](2406eac542) Fix minified build.
- [`17a34bc`](17a34bc585) Fix test bootstrap for core build.
- [`53838a3`](53838a38f8) Fix tests in older browsers.
- Additional commits viewable in [compare view](https://github.com/lodash/lodash/compare/4.17.11...4.17.14)
</details>
<br />

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=lodash&package-manager=npm_and_yarn&previous-version=4.17.11&new-version=4.17.14)](https://help.github.com/articles/configuring-automated-security-fixes)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot ignore this [patch|minor|major] version` will close this PR and stop Dependabot creating any more for this minor/major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
- `@dependabot use these labels` will set the current labels as the default for future PRs for this repo and language
- `@dependabot use these reviewers` will set the current reviewers as the default for future PRs for this repo and language
- `@dependabot use these assignees` will set the current assignees as the default for future PRs for this repo and language
- `@dependabot use this milestone` will set the current milestone as the default for future PRs for this repo and language


</details>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2019-07-12 06:40:25 +00:00
dependabot[bot]
83ab841bfa
Bump lodash from 4.17.11 to 4.17.14 in /editors/code
Bumps [lodash](https://github.com/lodash/lodash) from 4.17.11 to 4.17.14.
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](https://github.com/lodash/lodash/compare/4.17.11...4.17.14)

Signed-off-by: dependabot[bot] <support@github.com>
2019-07-11 23:44:16 +00:00
bors[bot]
fa3716efe6 Merge #1520
1520: Ignore workspace/didChangeConfiguration notifications. r=matklad a=bolinfest

If the client happens to send a `workspace/didChangeConfiguration`
notification, it is nicer if rust-analyzer can just ignore it rather than
crash with an "unhandled notification" error.

Co-authored-by: Michael Bolin <bolinfest@gmail.com>
2019-07-11 09:13:10 +00:00
Michael Bolin
e81a47b8eb Remove executeCommandProvider: apply_code_action.
This appears to have been introduced ages ago in
be742a5877
but has since been removed.

As it stands, it is problematic if multiple instances of the
rust-analyzer LSP are launched during the same VS Code session because
VS Code complains about multiple LSP servers trying to register the
same command.

Most LSP servers workaround this by parameterizing the command by the
process id. For example, this is where `rls` does this:

ff0b9057c8/rls/src/server/mod.rs (L413-L421)

Though `apply_code_action` does not seems to be used, so it seems better
to delete it than to parameterize it.
2019-07-10 22:49:35 -07:00
Michael Bolin
a814883cd4 Ignore workspace/didChangeConfiguration notifications. 2019-07-10 20:56:16 -07:00
bors[bot]
46d7b08c5f Merge #1519
1519: Move whitespace manipulation inside AstEditor r=matklad a=viorina



Co-authored-by: Ekaterina Babshukova <ekaterina.babshukova@yandex.ru>
2019-07-10 19:06:44 +00:00
Ekaterina Babshukova
895597d567 move whitespace manipulation inside AstEditor 2019-07-10 22:03:00 +03:00
bors[bot]
82c3fe7d13 Merge #1518
1518: Remove a fixme r=matklad a=killercup

Just saw the new release of SmolStr and was reminded of this FIXME I added :)

Co-authored-by: Pascal Hertleif <pascal@technocreatives.com>
2019-07-10 16:59:44 +00:00
Pascal Hertleif
6e87065968 Make clippy a bit happier
Random drive-by fix. I honestly blame rust-analyzer itself on this,
because I set its watch mode to use `cargo clippy` 🤷
2019-07-10 17:05:39 +02:00
Pascal Hertleif
d0ff53de2d Resolve a FIXME
Now that we are using a newer smol_str release this can be simplified :)
2019-07-10 17:04:38 +02:00