]> git.lizzy.rs Git - rust.git/log
rust.git
4 years agoMerge #5401
bors[bot] [Thu, 16 Jul 2020 08:02:39 +0000 (08:02 +0000)]
Merge #5401

5401: Implement Chalk closure support r=matklad a=flodiebold

This makes use of Chalk's closure support, which means we can get rid of our last built-in impls and a bunch of other surrounding stuff.

Co-authored-by: Florian Diebold <flodiebold@gmail.com>
4 years agoMerge #5402
bors[bot] [Wed, 15 Jul 2020 22:18:49 +0000 (22:18 +0000)]
Merge #5402

5402: Update lsp-types for HoverOptions r=kjeremy a=kjeremy

Co-authored-by: Jeremy Kolb <kjeremy@gmail.com>
4 years agoUpdate lsp-types for HoverOptions
Jeremy Kolb [Wed, 15 Jul 2020 22:17:46 +0000 (18:17 -0400)]
Update lsp-types for HoverOptions

4 years agoRemove TypeCtor interning
Florian Diebold [Wed, 15 Jul 2020 19:47:45 +0000 (21:47 +0200)]
Remove TypeCtor interning

Our TypeCtor and Chalk's TypeName match now!

4 years agoUse Chalk closure support
Florian Diebold [Sun, 12 Jul 2020 13:26:02 +0000 (15:26 +0200)]
Use Chalk closure support

4 years agoMerge #5350
bors[bot] [Wed, 15 Jul 2020 17:58:46 +0000 (17:58 +0000)]
Merge #5350

5350: Filter assists r=matklad a=kjeremy

Uses the `CodeActionContext::only` field to compute only those assists the client cares about.

It works but I don't really like the implementation.

Co-authored-by: kjeremy <kjeremy@gmail.com>
Co-authored-by: Jeremy Kolb <kjeremy@gmail.com>
4 years agoMerge #5396
bors[bot] [Wed, 15 Jul 2020 15:19:07 +0000 (15:19 +0000)]
Merge #5396

5396: Cap macro expansion depth for IDE features r=matklad a=matklad

closes #4453

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years agoCap macro expansion depth for IDE features
Aleksey Kladov [Wed, 15 Jul 2020 15:18:19 +0000 (17:18 +0200)]
Cap macro expansion depth for IDE features

closes #4453

4 years agoMerge #5348
bors[bot] [Wed, 15 Jul 2020 14:49:34 +0000 (14:49 +0000)]
Merge #5348

5348: Highlight punctuation as `HighlightTag::Operator` r=matklad a=ltentrup

Fixes #4620

Co-authored-by: Leander Tentrup <leander.tentrup@gmail.com>
4 years agoAdd new `Punctuation` highlight tag
Leander Tentrup [Wed, 15 Jul 2020 14:34:11 +0000 (16:34 +0200)]
Add new `Punctuation` highlight tag

4 years agoHighlight punctuation as `HighlightTag::Operator`
Leander Tentrup [Mon, 13 Jul 2020 20:59:42 +0000 (22:59 +0200)]
Highlight punctuation as `HighlightTag::Operator`

4 years agoMerge #5395
bors[bot] [Wed, 15 Jul 2020 14:06:28 +0000 (14:06 +0000)]
Merge #5395

5395: Show fewer syntax errors r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years agoShow fewer syntax errors
Aleksey Kladov [Wed, 15 Jul 2020 14:05:45 +0000 (16:05 +0200)]
Show fewer syntax errors

4 years agoMerge #5394
bors[bot] [Wed, 15 Jul 2020 13:54:04 +0000 (13:54 +0000)]
Merge #5394

5394: Add missing cancellation point r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years agoCleanup limits
Aleksey Kladov [Wed, 15 Jul 2020 13:52:32 +0000 (15:52 +0200)]
Cleanup limits

4 years agoCheck cancellation when updating imports recursively
Aleksey Kladov [Wed, 15 Jul 2020 13:49:20 +0000 (15:49 +0200)]
Check cancellation when updating imports recursively

For winapi, this takes a lot of CPU time without doing queries and
causes the main event loop to stall on cancellation.

4 years agoMicro-optimize update
Aleksey Kladov [Wed, 15 Jul 2020 13:45:34 +0000 (15:45 +0200)]
Micro-optimize update

4 years agoMove allow list into AssistConfig
Jeremy Kolb [Wed, 15 Jul 2020 13:45:30 +0000 (09:45 -0400)]
Move allow list into AssistConfig

4 years agoMerge #5390
bors[bot] [Wed, 15 Jul 2020 12:38:24 +0000 (12:38 +0000)]
Merge #5390

5390: Don't drop flycheck messages during restart r=matklad a=matklad

closes #5386

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years agoDon't drop flycheck messages during restart
Aleksey Kladov [Wed, 15 Jul 2020 12:37:44 +0000 (14:37 +0200)]
Don't drop flycheck messages during restart

closes #5386

4 years agoInvert condition
Jeremy Kolb [Wed, 15 Jul 2020 12:17:48 +0000 (08:17 -0400)]
Invert condition

4 years agoFix conversion
Jeremy Kolb [Wed, 15 Jul 2020 12:17:32 +0000 (08:17 -0400)]
Fix conversion

4 years agoMerge #5387
bors[bot] [Wed, 15 Jul 2020 12:07:05 +0000 (12:07 +0000)]
Merge #5387

5387: Add --memory-usage to analysis-bench r=matklad a=jonas-schievink

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
4 years agoAdd --memory-usage to analysis-bench
Jonas Schievink [Wed, 15 Jul 2020 10:14:51 +0000 (12:14 +0200)]
Add --memory-usage to analysis-bench

4 years agoMerge #5345
bors[bot] [Wed, 15 Jul 2020 10:00:10 +0000 (10:00 +0000)]
Merge #5345

5345: Semantic Highlighting: Emit mutable modifier for 'self' when applicable r=matklad a=Veykril

This PR implements emitting the mutable modifier for the self keyword when applicable for semantic highlighting as mentioned in #5041. The rendered highlighting test html file:
![firefox_5lbsFNBqsT](https://user-images.githubusercontent.com/3757771/87346245-a5a07280-c551-11ea-9051-e5901255f8c9.png)
As you can see it does not emit the modifier when `self` is not used in a mutable context even if it is declared mutably in the enclosing function. I'm not sure if this is actually something wanted or not.

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
4 years agoMerge #5354
bors[bot] [Wed, 15 Jul 2020 09:43:08 +0000 (09:43 +0000)]
Merge #5354

5354: Add opt-in mimalloc feature r=matklad a=ivan

This adds a `mimalloc` feature to use [mimalloc](https://github.com/microsoft/mimalloc) via [mimalloc_rust](https://github.com/purpleprotocol/mimalloc_rust), and a corresponding `cargo xtask install --server --mimalloc`.

In my tests on Linux, mimalloc seems to run consistently faster than jemalloc and uses only slightly more memory in `analysis-stats` on chalk. Also, builds with mimalloc produce a binary 3MB smaller than builds with jemalloc.

A summary of `env time -v cargo run --release -p rust-analyzer -- analysis-stats ../chalk/` runs on NixOS master on an Intel 4790K in VMware Workstation:

<table>
<tr>
<td></td><td>self-reported time</td><td>elapsed time</td><td>max RSS</td>
</tr>
<tr><td>glibc 2.30 run 1</td><td>225.1 sec</td><td>3:46.91</td><td>1075208</td></tr>
<tr><td>glibc 2.30 run 2</td><td>228.4 sec</td><td>3:50.13</td><td>1074996</td></tr>
<tr><td>jemalloc run 1</td><td>201.8 sec</td><td>3:23.03</td><td>1055960</td></tr>
<tr><td>jemalloc run 2</td><td>199.2 sec</td><td>3:20.41</td><td>1065040</td></tr>
<tr><td>mimalloc run 1</td><td>188.6 sec</td><td>3:09.77</td><td>1105584</td></tr>
<tr><td>mimalloc run 2</td><td>185.0 sec</td><td>3:06.23</td><td>1108132</td></tr>
<tr><td>mimalloc + lto run 1</td><td>160.7 sec</td><td>2:41.80</td><td>1106076</td></tr>
<tr><td>mimalloc + lto run 2</td><td>162.2 sec</td><td>2:43.31</td><td>1104268</td></tr>
</tr>
</table>

I included an `lto = true; codegen-units = 1` run out of curiosity, this PR doesn't enable it.

<details>
<summary>analysis-stats benchmark runs</summary>

## default

```
# env time -v cargo run --release -p rust-analyzer -- analysis-stats ../chalk/
    Finished release [optimized] target(s) in 0.10s
     Running `target/release/rust-analyzer analysis-stats ../chalk/`
[ERROR ra_project_model] cyclic dependency chalk-integration -> chalk-engine
[ERROR ra_project_model] cyclic dependency chalk-recursive -> chalk-integration
[ERROR ra_project_model] cyclic dependency chalk-solve -> chalk-integration
Database loaded 333.880345ms
Crates in this dir: 11
Total modules found: 159
Total declarations: 2631
Total functions: 1947
Item Collection: 10.176299461s, 0b allocated 0b resident
Total expressions: 57094
Expressions of unknown type: 2938 (5%)
Expressions of partially unknown type: 2427 (4%)
Type mismatches: 232
Inference: 214.968806927s, 0b allocated 0b resident
Total: 225.145114417s, 0b allocated 0b resident
        Command being timed: "cargo run --release -p rust-analyzer -- analysis-stats ../chalk/"
        User time (seconds): 225.34
        System time (seconds): 1.49
        Percent of CPU this job got: 99%
        Elapsed (wall clock) time (h:mm:ss or m:ss): 3:46.91
        Average shared text size (kbytes): 0
        Average unshared data size (kbytes): 0
        Average stack size (kbytes): 0
        Average total size (kbytes): 0
        Maximum resident set size (kbytes): 1075208
        Average resident set size (kbytes): 0
        Major (requiring I/O) page faults: 6
        Minor (reclaiming a frame) page faults: 294711
        Voluntary context switches: 365
        Involuntary context switches: 3273
        Swaps: 0
        File system inputs: 2904
        File system outputs: 0
        Socket messages sent: 0
        Socket messages received: 0
        Signals delivered: 0
        Page size (bytes): 4096
        Exit status: 0
# env time -v cargo run --release -p rust-analyzer -- analysis-stats ../chalk/
    Finished release [optimized] target(s) in 0.10s
     Running `target/release/rust-analyzer analysis-stats ../chalk/`
[ERROR ra_project_model] cyclic dependency chalk-integration -> chalk-engine
[ERROR ra_project_model] cyclic dependency chalk-recursive -> chalk-integration
[ERROR ra_project_model] cyclic dependency chalk-solve -> chalk-integration
Database loaded 332.711598ms
Crates in this dir: 11
Total modules found: 159
Total declarations: 2631
Total functions: 1947
Item Collection: 9.895020518s, 0b allocated 0b resident
Total expressions: 57094
Expressions of unknown type: 2938 (5%)
Expressions of partially unknown type: 2427 (4%)
Type mismatches: 232
Inference: 218.5001697s, 0b allocated 0b resident
Total: 228.39519833s, 0b allocated 0b resident
        Command being timed: "cargo run --release -p rust-analyzer -- analysis-stats ../chalk/"
        User time (seconds): 228.26
        System time (seconds): 1.75
        Percent of CPU this job got: 99%
        Elapsed (wall clock) time (h:mm:ss or m:ss): 3:50.13
        Average shared text size (kbytes): 0
        Average unshared data size (kbytes): 0
        Average stack size (kbytes): 0
        Average total size (kbytes): 0
        Maximum resident set size (kbytes): 1074996
        Average resident set size (kbytes): 0
        Major (requiring I/O) page faults: 9
        Minor (reclaiming a frame) page faults: 294748
        Voluntary context switches: 330
        Involuntary context switches: 1561
        Swaps: 0
        File system inputs: 12608
        File system outputs: 0
        Socket messages sent: 0
        Socket messages received: 0
        Signals delivered: 0
        Page size (bytes): 4096
        Exit status: 0
```

## jemalloc
```
# env time -v cargo run --release -p rust-analyzer -- analysis-stats ../chalk/
    Finished release [optimized] target(s) in 0.11s
     Running `target/release/rust-analyzer analysis-stats ../chalk/`
[ERROR ra_project_model] cyclic dependency chalk-integration -> chalk-engine
[ERROR ra_project_model] cyclic dependency chalk-recursive -> chalk-integration
[ERROR ra_project_model] cyclic dependency chalk-solve -> chalk-integration
Database loaded 356.090374ms
Crates in this dir: 11
Total modules found: 159
Total declarations: 2631
Total functions: 1947
Item Collection: 10.176550183s, 439mb allocated 465mb resident
Total expressions: 57094
Expressions of unknown type: 2938 (5%)
Expressions of partially unknown type: 2427 (4%)
Type mismatches: 232
Inference: 191.607201827s, 993mb allocated 1036mb resident
Total: 201.783937913s, 993mb allocated 1036mb resident
        Command being timed: "cargo run --release -p rust-analyzer -- analysis-stats ../chalk/"
        User time (seconds): 201.07
        System time (seconds): 1.89
        Percent of CPU this job got: 99%
        Elapsed (wall clock) time (h:mm:ss or m:ss): 3:23.03
        Average shared text size (kbytes): 0
        Average unshared data size (kbytes): 0
        Average stack size (kbytes): 0
        Average total size (kbytes): 0
        Maximum resident set size (kbytes): 1055960
        Average resident set size (kbytes): 0
        Major (requiring I/O) page faults: 0
        Minor (reclaiming a frame) page faults: 357755
        Voluntary context switches: 240
        Involuntary context switches: 1889
        Swaps: 0
        File system inputs: 256
        File system outputs: 0
        Socket messages sent: 0
        Socket messages received: 0
        Signals delivered: 0
        Page size (bytes): 4096
        Exit status: 0
# env time -v cargo run --release -p rust-analyzer -- analysis-stats ../chalk/
    Finished release [optimized] target(s) in 0.10s
     Running `target/release/rust-analyzer analysis-stats ../chalk/`
[ERROR ra_project_model] cyclic dependency chalk-integration -> chalk-engine
[ERROR ra_project_model] cyclic dependency chalk-recursive -> chalk-integration
[ERROR ra_project_model] cyclic dependency chalk-solve -> chalk-integration
Database loaded 317.917622ms
Crates in this dir: 11
Total modules found: 159
Total declarations: 2631
Total functions: 1947
Item Collection: 9.902142185s, 439mb allocated 463mb resident
Total expressions: 57094
Expressions of unknown type: 2938 (5%)
Expressions of partially unknown type: 2427 (4%)
Type mismatches: 232
Inference: 189.295317017s, 993mb allocated 1046mb resident
Total: 199.197555943s, 993mb allocated 1046mb resident
        Command being timed: "cargo run --release -p rust-analyzer -- analysis-stats ../chalk/"
        User time (seconds): 198.64
        System time (seconds): 1.67
        Percent of CPU this job got: 99%
        Elapsed (wall clock) time (h:mm:ss or m:ss): 3:20.41
        Average shared text size (kbytes): 0
        Average unshared data size (kbytes): 0
        Average stack size (kbytes): 0
        Average total size (kbytes): 0
        Maximum resident set size (kbytes): 1065040
        Average resident set size (kbytes): 0
        Major (requiring I/O) page faults: 0
        Minor (reclaiming a frame) page faults: 369013
        Voluntary context switches: 243
        Involuntary context switches: 2835
        Swaps: 0
        File system inputs: 0
        File system outputs: 0
        Socket messages sent: 0
        Socket messages received: 0
        Signals delivered: 0
        Page size (bytes): 4096
        Exit status: 0
```

## mimalloc
```
# env time -v cargo run --release -p rust-analyzer -- analysis-stats ../chalk/
    Finished release [optimized] target(s) in 0.12s
     Running `target/release/rust-analyzer analysis-stats ../chalk/`
[ERROR ra_project_model] cyclic dependency chalk-integration -> chalk-engine
[ERROR ra_project_model] cyclic dependency chalk-recursive -> chalk-integration
[ERROR ra_project_model] cyclic dependency chalk-solve -> chalk-integration
Database loaded 332.116806ms
Crates in this dir: 11
Total modules found: 159
Total declarations: 2631
Total functions: 1947
Item Collection: 9.796643695s, 0b allocated 0b resident
Total expressions: 57094
Expressions of unknown type: 2938 (5%)
Expressions of partially unknown type: 2427 (4%)
Type mismatches: 232
Inference: 178.82132362s, 0b allocated 0b resident
Total: 188.617975605s, 0b allocated 0b resident
        Command being timed: "cargo run --release -p rust-analyzer -- analysis-stats ../chalk/"
        User time (seconds): 187.70
        System time (seconds): 1.97
        Percent of CPU this job got: 99%
        Elapsed (wall clock) time (h:mm:ss or m:ss): 3:09.77
        Average shared text size (kbytes): 0
        Average unshared data size (kbytes): 0
        Average stack size (kbytes): 0
        Average total size (kbytes): 0
        Maximum resident set size (kbytes): 1105584
        Average resident set size (kbytes): 0
        Major (requiring I/O) page faults: 0
        Minor (reclaiming a frame) page faults: 296481
        Voluntary context switches: 222
        Involuntary context switches: 1868
        Swaps: 0
        File system inputs: 256
        File system outputs: 0
        Socket messages sent: 0
        Socket messages received: 0
        Signals delivered: 0
        Page size (bytes): 4096
        Exit status: 0
# env time -v cargo run --release -p rust-analyzer -- analysis-stats ../chalk/
    Finished release [optimized] target(s) in 0.13s
     Running `target/release/rust-analyzer analysis-stats ../chalk/`
[ERROR ra_project_model] cyclic dependency chalk-integration -> chalk-engine
[ERROR ra_project_model] cyclic dependency chalk-recursive -> chalk-integration
[ERROR ra_project_model] cyclic dependency chalk-solve -> chalk-integration
Database loaded 320.046776ms
Crates in this dir: 11
Total modules found: 159
Total declarations: 2631
Total functions: 1947
Item Collection: 9.287690124s, 0b allocated 0b resident
Total expressions: 57094
Expressions of unknown type: 2938 (5%)
Expressions of partially unknown type: 2427 (4%)
Type mismatches: 232
Inference: 175.710939697s, 0b allocated 0b resident
Total: 184.998640033s, 0b allocated 0b resident
        Command being timed: "cargo run --release -p rust-analyzer -- analysis-stats ../chalk/"
        User time (seconds): 184.38
        System time (seconds): 1.81
        Percent of CPU this job got: 99%
        Elapsed (wall clock) time (h:mm:ss or m:ss): 3:06.23
        Average shared text size (kbytes): 0
        Average unshared data size (kbytes): 0
        Average stack size (kbytes): 0
        Average total size (kbytes): 0
        Maximum resident set size (kbytes): 1108132
        Average resident set size (kbytes): 0
        Major (requiring I/O) page faults: 0
        Minor (reclaiming a frame) page faults: 297055
        Voluntary context switches: 374
        Involuntary context switches: 2374
        Swaps: 0
        File system inputs: 0
        File system outputs: 0
        Socket messages sent: 0
        Socket messages received: 0
        Signals delivered: 0
        Page size (bytes): 4096
        Exit status: 0
```

## mimalloc + lto
```
# env time -v cargo run --release -p rust-analyzer -- analysis-stats ../chalk/
    Finished release [optimized] target(s) in 0.11s
     Running `target/release/rust-analyzer analysis-stats ../chalk/`
[ERROR ra_project_model] cyclic dependency chalk-integration -> chalk-engine
[ERROR ra_project_model] cyclic dependency chalk-recursive -> chalk-integration
[ERROR ra_project_model] cyclic dependency chalk-solve -> chalk-integration
Database loaded 369.600196ms
Crates in this dir: 11
Total modules found: 159
Total declarations: 2631
Total functions: 1947
Item Collection: 7.572726834s, 0b allocated 0b resident
Total expressions: 57094
Expressions of unknown type: 2938 (5%)
Expressions of partially unknown type: 2427 (4%)
Type mismatches: 232
Inference: 153.090899101s, 0b allocated 0b resident
Total: 160.663635235s, 0b allocated 0b resident
        Command being timed: "cargo run --release -p rust-analyzer -- analysis-stats ../chalk/"
        User time (seconds): 160.01
        System time (seconds): 1.70
        Percent of CPU this job got: 99%
        Elapsed (wall clock) time (h:mm:ss or m:ss): 2:41.80
        Average shared text size (kbytes): 0
        Average unshared data size (kbytes): 0
        Average stack size (kbytes): 0
        Average total size (kbytes): 0
        Maximum resident set size (kbytes): 1106076
        Average resident set size (kbytes): 0
        Major (requiring I/O) page faults: 1
        Minor (reclaiming a frame) page faults: 296610
        Voluntary context switches: 209
        Involuntary context switches: 2798
        Swaps: 0
        File system inputs: 8
        File system outputs: 0
        Socket messages sent: 0
        Socket messages received: 0
        Signals delivered: 0
        Page size (bytes): 4096
        Exit status: 0
# env time -v cargo run --release -p rust-analyzer -- analysis-stats ../chalk/
    Finished release [optimized] target(s) in 0.10s
     Running `target/release/rust-analyzer analysis-stats ../chalk/`
[ERROR ra_project_model] cyclic dependency chalk-integration -> chalk-engine
[ERROR ra_project_model] cyclic dependency chalk-recursive -> chalk-integration
[ERROR ra_project_model] cyclic dependency chalk-solve -> chalk-integration
Database loaded 334.630658ms
Crates in this dir: 11
Total modules found: 159
Total declarations: 2631
Total functions: 1947
Item Collection: 7.71699197s, 0b allocated 0b resident
Total expressions: 57094
Expressions of unknown type: 2938 (5%)
Expressions of partially unknown type: 2427 (4%)
Type mismatches: 232
Inference: 154.50351318s, 0b allocated 0b resident
Total: 162.220513775s, 0b allocated 0b resident
        Command being timed: "cargo run --release -p rust-analyzer -- analysis-stats ../chalk/"
        User time (seconds): 161.52
        System time (seconds): 1.74
        Percent of CPU this job got: 99%
        Elapsed (wall clock) time (h:mm:ss or m:ss): 2:43.31
        Average shared text size (kbytes): 0
        Average unshared data size (kbytes): 0
        Average stack size (kbytes): 0
        Average total size (kbytes): 0
        Maximum resident set size (kbytes): 1104268
        Average resident set size (kbytes): 0
        Major (requiring I/O) page faults: 0
        Minor (reclaiming a frame) page faults: 296183
        Voluntary context switches: 200
        Involuntary context switches: 1666
        Swaps: 0
        File system inputs: 0
        File system outputs: 0
        Socket messages sent: 0
        Socket messages received: 0
        Signals delivered: 0
        Page size (bytes): 4096
        Exit status: 0
```
</details>

Co-authored-by: Ivan Kozik <ivan@ludios.org>
4 years agoMerge #5385
bors[bot] [Wed, 15 Jul 2020 08:17:13 +0000 (08:17 +0000)]
Merge #5385

5385: Off by one error when determining the active param r=matklad a=matklad

closes #3615

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years agoOff by one error when determining the active param
Aleksey Kladov [Wed, 15 Jul 2020 08:14:23 +0000 (10:14 +0200)]
Off by one error when determining the active param

closes #3615

4 years agoRefactor CallInfo tests
Aleksey Kladov [Wed, 15 Jul 2020 08:09:10 +0000 (10:09 +0200)]
Refactor CallInfo tests

4 years agoAdd opt-in mimalloc feature
Ivan Kozik [Tue, 14 Jul 2020 00:12:49 +0000 (00:12 +0000)]
Add opt-in mimalloc feature

4 years agoMerge #5378
bors[bot] [Tue, 14 Jul 2020 19:29:28 +0000 (19:29 +0000)]
Merge #5378

5378: Thread varargs through rust-analyzer r=flodiebold a=jonas-schievink

This adds a varargs flag to various data structures and fills it from the AST.

Fixes https://github.com/rust-analyzer/rust-analyzer/issues/5374

cc @flodiebold for the typesystem/chalk changes

Co-authored-by: Jonas Schievink <jonas.schievink@ferrous-systems.com>
4 years agoAdd FIXME
Jonas Schievink [Tue, 14 Jul 2020 16:59:07 +0000 (18:59 +0200)]
Add FIXME

4 years agoUpdate ItemTree snapshots
Jonas Schievink [Tue, 14 Jul 2020 16:28:29 +0000 (18:28 +0200)]
Update ItemTree snapshots

4 years agoThread varargs through r-a
Jonas Schievink [Tue, 14 Jul 2020 16:23:45 +0000 (18:23 +0200)]
Thread varargs through r-a

4 years agoMerge #5381
bors[bot] [Tue, 14 Jul 2020 18:09:36 +0000 (18:09 +0000)]
Merge #5381

5381: ItemTree: Lower tuple types despite invalid type r=flodiebold a=jonas-schievink

Fixes https://github.com/rust-analyzer/rust-analyzer/issues/5380

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
4 years agoItemTree: Lower tuple types despite invalid type
Jonas Schievink [Tue, 14 Jul 2020 17:57:41 +0000 (19:57 +0200)]
ItemTree: Lower tuple types despite invalid type

4 years agoMerge #5379
bors[bot] [Tue, 14 Jul 2020 16:32:43 +0000 (16:32 +0000)]
Merge #5379

5379: Guard against infinite macro expansions r=matklad a=matklad

closes #4463

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years agoGuard against infinite macro expansions
Aleksey Kladov [Tue, 14 Jul 2020 16:31:48 +0000 (18:31 +0200)]
Guard against infinite macro expansions

closes #4463

4 years agoMerge #5377
bors[bot] [Tue, 14 Jul 2020 15:46:01 +0000 (15:46 +0000)]
Merge #5377

5377: Fix classify_name_ref on multi-path macro calls r=matklad a=jonas-schievink

Previously, "go to definition" on `log<|>::info!(...)` would go to the `info!` macro, not to the `log` crate. This fixes that.

Co-authored-by: Jonas Schievink <jonas.schievink@ferrous-systems.com>
4 years agoMerge #5375
bors[bot] [Tue, 14 Jul 2020 15:26:10 +0000 (15:26 +0000)]
Merge #5375

5375: Use more explicit type for save registration r=matklad a=kjeremy

This was introduced in the latest lsp-types

Co-authored-by: kjeremy <kjeremy@gmail.com>
4 years agoFix classify_name_ref on multi-path macro calls
Jonas Schievink [Tue, 14 Jul 2020 15:23:33 +0000 (17:23 +0200)]
Fix classify_name_ref on multi-path macro calls

4 years agoMerge #5376
bors[bot] [Tue, 14 Jul 2020 15:14:29 +0000 (15:14 +0000)]
Merge #5376

5376: Check licenses r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years agoCheck licenses
Aleksey Kladov [Tue, 14 Jul 2020 15:14:00 +0000 (17:14 +0200)]
Check licenses

4 years agoUse more explicity type for save registration
kjeremy [Tue, 14 Jul 2020 15:03:44 +0000 (11:03 -0400)]
Use more explicity type for save registration

4 years agoMerge #5373
bors[bot] [Tue, 14 Jul 2020 14:45:03 +0000 (14:45 +0000)]
Merge #5373

5373: Clenup diagnostics tests r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years agoRemove randomly commited file
Aleksey Kladov [Tue, 14 Jul 2020 14:44:32 +0000 (16:44 +0200)]
Remove randomly commited file

4 years agoRefactor the test of diagnostic tests
Aleksey Kladov [Tue, 14 Jul 2020 14:43:39 +0000 (16:43 +0200)]
Refactor the test of diagnostic tests

4 years agoMerge #5372
bors[bot] [Tue, 14 Jul 2020 13:58:32 +0000 (13:58 +0000)]
Merge #5372

5372: Minor, push allocations down r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years agoMinor, push allocations down
Aleksey Kladov [Tue, 14 Jul 2020 13:57:10 +0000 (15:57 +0200)]
Minor, push allocations down

4 years agoMerge #5371
bors[bot] [Tue, 14 Jul 2020 12:58:34 +0000 (12:58 +0000)]
Merge #5371

5371: Allow multiline annotations r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years agoAllow multiline annotations
Aleksey Kladov [Tue, 14 Jul 2020 12:57:33 +0000 (14:57 +0200)]
Allow multiline annotations

4 years agoMerge pull request #5370 from matklad/parens
Aleksey Kladov [Tue, 14 Jul 2020 12:39:46 +0000 (14:39 +0200)]
Merge pull request #5370 from matklad/parens

Don't duplicate parens in patterns

4 years agoGeneraize annotation extraction
Aleksey Kladov [Tue, 14 Jul 2020 12:01:54 +0000 (14:01 +0200)]
Generaize annotation extraction

4 years agoDon't duplicate parens in patterns
Aleksey Kladov [Tue, 14 Jul 2020 11:51:43 +0000 (13:51 +0200)]
Don't duplicate parens in patterns

4 years agoAdd mark
Aleksey Kladov [Tue, 14 Jul 2020 11:46:29 +0000 (13:46 +0200)]
Add mark

4 years agoMerge #5367
bors[bot] [Tue, 14 Jul 2020 11:37:28 +0000 (11:37 +0000)]
Merge #5367

5367: missing impl members: remove assoc. type bounds r=matklad a=jonas-schievink

Previously "Add missing impl members" would paste bounds on associated types into the impl, which is not allowed. This removes them before pasting the item.

Co-authored-by: Jonas Schievink <jonas.schievink@ferrous-systems.com>
4 years agoMove remove_bounds to edit.rs
Jonas Schievink [Tue, 14 Jul 2020 11:33:37 +0000 (13:33 +0200)]
Move remove_bounds to edit.rs

4 years agoMerge pull request #5356 from JohnTitor/cache
Aleksey Kladov [Tue, 14 Jul 2020 11:27:57 +0000 (13:27 +0200)]
Merge pull request #5356 from JohnTitor/cache

Update actions/cache to v2

4 years agoUpdate actions/cache to v2
Yuki Okushi [Tue, 14 Jul 2020 02:04:00 +0000 (11:04 +0900)]
Update actions/cache to v2

4 years agoMerge #5368
bors[bot] [Tue, 14 Jul 2020 11:13:58 +0000 (11:13 +0000)]
Merge #5368

5368: Compress match checking tests r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years agoCompress match checking tests
Aleksey Kladov [Tue, 14 Jul 2020 11:10:09 +0000 (13:10 +0200)]
Compress match checking tests

4 years agomissing impl members: remove assoc. type bounds
Jonas Schievink [Tue, 14 Jul 2020 11:12:16 +0000 (13:12 +0200)]
missing impl members: remove assoc. type bounds

4 years agoData-driven diagnostics tests
Aleksey Kladov [Tue, 14 Jul 2020 10:05:50 +0000 (12:05 +0200)]
Data-driven diagnostics tests

4 years agoMerge pull request #5361 from matklad/power
Aleksey Kladov [Tue, 14 Jul 2020 09:39:05 +0000 (11:39 +0200)]
Merge pull request #5361 from matklad/power

Check power on CI

4 years agoMerge #5355
bors[bot] [Tue, 14 Jul 2020 09:18:17 +0000 (09:18 +0000)]
Merge #5355

5355: Add a license field to all the crates r=matklad a=JohnTitor

Some are unnecessary but it's okay to have it, I think.
cc https://github.com/rust-lang/rust/issues/74269

Co-authored-by: Yuki Okushi <huyuumi.dev@gmail.com>
4 years agoMerge #5363
bors[bot] [Tue, 14 Jul 2020 09:10:46 +0000 (09:10 +0000)]
Merge #5363

5363: Reduce visibility r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years agoReduce visibility
Aleksey Kladov [Tue, 14 Jul 2020 09:09:41 +0000 (11:09 +0200)]
Reduce visibility

4 years agoCheck power on CI
Aleksey Kladov [Tue, 14 Jul 2020 09:01:18 +0000 (11:01 +0200)]
Check power on CI

4 years agoMerge #5359
bors[bot] [Tue, 14 Jul 2020 08:53:02 +0000 (08:53 +0000)]
Merge #5359

5359: Cleanup visibility r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years agoCleanup visibility
Aleksey Kladov [Tue, 14 Jul 2020 08:52:18 +0000 (10:52 +0200)]
Cleanup visibility

4 years agoMerge #5358
bors[bot] [Tue, 14 Jul 2020 08:30:07 +0000 (08:30 +0000)]
Merge #5358

5358: Cleanup hir diagnostics API r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years agoCleanup hir diagnostics API
Aleksey Kladov [Tue, 14 Jul 2020 08:28:55 +0000 (10:28 +0200)]
Cleanup hir diagnostics API

4 years agoConsolidate hir diagnostics code in one place
Aleksey Kladov [Tue, 14 Jul 2020 08:18:08 +0000 (10:18 +0200)]
Consolidate hir diagnostics code in one place

4 years agoMerge #5357
bors[bot] [Tue, 14 Jul 2020 07:05:43 +0000 (07:05 +0000)]
Merge #5357

5357: Use relaxed ordering for marks r=matklad a=matklad

We dont' need this for perf. `Relaxed` ordering is enough here, as we
only have one location. I prefer to use minimal ordering, because that
makes it easier to reason about the code.

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years agoUse relaxed ordering for marks
Aleksey Kladov [Tue, 14 Jul 2020 07:04:11 +0000 (09:04 +0200)]
Use relaxed ordering for marks

We dont' need this for perf. `Relaxed` ordering is enough here, as we
only have one location. I prefer to use minimal ordering, because that
makes it easier to reason about the code.

4 years agoAdd a license field to all the crates
Yuki Okushi [Tue, 14 Jul 2020 01:57:26 +0000 (10:57 +0900)]
Add a license field to all the crates

4 years agoMerge #5352
bors[bot] [Mon, 13 Jul 2020 22:12:30 +0000 (22:12 +0000)]
Merge #5352

5352: Bump tracing-tree to remove quanta r=kjeremy a=kjeremy

Hopefully fixes power 32-bit build.
See: https://rust-lang.zulipchat.com/#narrow/stream/185405-t-compiler.2Fwg-rls-2.2E0/topic/Running.20check.20builds.20on.2032.20bit.20power

Co-authored-by: kjeremy <kjeremy@gmail.com>
4 years agoBump tracing-tree to remove quanta
kjeremy [Mon, 13 Jul 2020 22:11:24 +0000 (18:11 -0400)]
Bump tracing-tree to remove quanta

Hopefully fixes power 32-bit build.
See: https://rust-lang.zulipchat.com/#narrow/stream/185405-t-compiler.2Fwg-rls-2.2E0/topic/Running.20check.20builds.20on.2032.20bit.20power

4 years agoFilter assists
kjeremy [Mon, 13 Jul 2020 21:41:47 +0000 (17:41 -0400)]
Filter assists

4 years agoSemantic Highlighting: Emit mutable modifier for 'self' when applicable
Lukas Wirth [Mon, 13 Jul 2020 19:39:01 +0000 (21:39 +0200)]
Semantic Highlighting: Emit mutable modifier for 'self' when applicable

4 years agoMerge #5342
bors[bot] [Mon, 13 Jul 2020 14:33:32 +0000 (14:33 +0000)]
Merge #5342

5342: Don't copy-paste `impl_froms` into every crate r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years agoDon't copy-paste `impl_froms` into every crate
Aleksey Kladov [Mon, 13 Jul 2020 14:16:53 +0000 (16:16 +0200)]
Don't copy-paste `impl_froms` into every crate

4 years agoMove stdx macros into submodule
Aleksey Kladov [Mon, 13 Jul 2020 13:54:12 +0000 (15:54 +0200)]
Move stdx macros into submodule

4 years agoMerge #5340 #5341
bors[bot] [Mon, 13 Jul 2020 13:44:38 +0000 (13:44 +0000)]
Merge #5340 #5341

5340: Prefill reviewer r=matklad a=matklad

bors r+
🤖

5341: Reorder imports r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years agoReorder imports
Aleksey Kladov [Mon, 13 Jul 2020 13:34:46 +0000 (15:34 +0200)]
Reorder imports

4 years agoPrefill reviewer
Aleksey Kladov [Mon, 13 Jul 2020 13:26:13 +0000 (15:26 +0200)]
Prefill reviewer

4 years agoMerge #5339
bors[bot] [Mon, 13 Jul 2020 13:33:01 +0000 (13:33 +0000)]
Merge #5339

5339: Update adler and syn r=kjeremy a=kjeremy

Might boost compression speeds: https://github.com/jonas-schievink/adler/releases/tag/v0.2.3

Co-authored-by: kjeremy <kjeremy@gmail.com>
4 years agoUpdate adler and syn
kjeremy [Mon, 13 Jul 2020 12:52:07 +0000 (08:52 -0400)]
Update adler and syn

4 years agoMerge #5331
bors[bot] [Sun, 12 Jul 2020 20:31:51 +0000 (20:31 +0000)]
Merge #5331

5331: Fix #4966 r=flodiebold a=flodiebold

We add a level of binders when converting our function pointer to Chalk's; we need to remove it again on the way back.

Fixes #4966.

Co-authored-by: Florian Diebold <florian.diebold@freiheit.com>
4 years agoMerge #5319
bors[bot] [Sun, 12 Jul 2020 20:20:36 +0000 (20:20 +0000)]
Merge #5319

5319: Chalk upgrade r=flodiebold a=flodiebold

 - upgrade Chalk
 - make use of Chalk's `Unsize` impls, remove ours
 - use Chalk's built-in array type
 - search efficiently for impls for an int/float variable
 - output Chalk tracing logs in hir_ty tests

Fixes #2534.
Fixes #5057.
Fixes #4374.
Fixes #4281.

Co-authored-by: Florian Diebold <flodiebold@gmail.com>
Co-authored-by: Florian Diebold <florian.diebold@freiheit.com>
4 years agoRemove some unnecessary file names
Florian Diebold [Sun, 12 Jul 2020 17:59:43 +0000 (19:59 +0200)]
Remove some unnecessary file names

4 years agoAdd test for #4281
Florian Diebold [Sat, 11 Jul 2020 17:55:11 +0000 (19:55 +0200)]
Add test for #4281

Fixes #4281.

4 years agoSearch more efficiently for int/float impls
Florian Diebold [Sat, 11 Jul 2020 17:12:10 +0000 (19:12 +0200)]
Search more efficiently for int/float impls

4 years agoAdapt trait object coercion tests to the status quo
Florian Diebold [Sat, 11 Jul 2020 16:42:30 +0000 (18:42 +0200)]
Adapt trait object coercion tests to the status quo

4 years agoUse Chalk built-in representation for array types
Florian Diebold [Sat, 11 Jul 2020 16:33:50 +0000 (18:33 +0200)]
Use Chalk built-in representation for array types

4 years agoRemove built-in Unsize impls
Florian Diebold [Sat, 11 Jul 2020 14:29:09 +0000 (16:29 +0200)]
Remove built-in Unsize impls

They exist in Chalk now.

4 years agoUpgrade Chalk
Florian Diebold [Sat, 11 Jul 2020 17:17:03 +0000 (19:17 +0200)]
Upgrade Chalk

4 years agoEnable Chalk tracing in hir_ty tests
Florian Diebold [Fri, 10 Jul 2020 16:30:32 +0000 (18:30 +0200)]
Enable Chalk tracing in hir_ty tests

4 years agoUpgrade Chalk
Florian Diebold [Sat, 11 Jul 2020 13:22:46 +0000 (15:22 +0200)]
Upgrade Chalk

4 years agoMerge #5332
bors[bot] [Sun, 12 Jul 2020 16:42:22 +0000 (16:42 +0000)]
Merge #5332

5332: Update lsp-types r=kjeremy a=kjeremy

Co-authored-by: Jeremy Kolb <kjeremy@gmail.com>