]> git.lizzy.rs Git - rust.git/log
rust.git
3 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>
3 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>
3 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

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

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

3 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>
3 years agoAdd FIXME
Jonas Schievink [Tue, 14 Jul 2020 16:59:07 +0000 (18:59 +0200)]
Add FIXME

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

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

3 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>
3 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

3 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>
3 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

3 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>
3 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>
3 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

3 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>
3 years agoCheck licenses
Aleksey Kladov [Tue, 14 Jul 2020 15:14:00 +0000 (17:14 +0200)]
Check licenses

3 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

3 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>
3 years agoRemove randomly commited file
Aleksey Kladov [Tue, 14 Jul 2020 14:44:32 +0000 (16:44 +0200)]
Remove randomly commited file

3 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

3 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>
3 years agoMinor, push allocations down
Aleksey Kladov [Tue, 14 Jul 2020 13:57:10 +0000 (15:57 +0200)]
Minor, push allocations down

3 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>
3 years agoAllow multiline annotations
Aleksey Kladov [Tue, 14 Jul 2020 12:57:33 +0000 (14:57 +0200)]
Allow multiline annotations

3 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

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

3 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

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

3 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>
3 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

3 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

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

3 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>
3 years agoCompress match checking tests
Aleksey Kladov [Tue, 14 Jul 2020 11:10:09 +0000 (13:10 +0200)]
Compress match checking tests

3 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

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

3 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

3 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>
3 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>
3 years agoReduce visibility
Aleksey Kladov [Tue, 14 Jul 2020 09:09:41 +0000 (11:09 +0200)]
Reduce visibility

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

3 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>
3 years agoCleanup visibility
Aleksey Kladov [Tue, 14 Jul 2020 08:52:18 +0000 (10:52 +0200)]
Cleanup visibility

3 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>
3 years agoCleanup hir diagnostics API
Aleksey Kladov [Tue, 14 Jul 2020 08:28:55 +0000 (10:28 +0200)]
Cleanup hir diagnostics API

3 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

3 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>
3 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.

3 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

3 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>
3 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 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>
4 years agoUpdate lsp-types
Jeremy Kolb [Sun, 12 Jul 2020 16:28:00 +0000 (12:28 -0400)]
Update lsp-types

4 years agoFix #4966
Florian Diebold [Fri, 10 Jul 2020 17:14:33 +0000 (19:14 +0200)]
Fix #4966

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

4 years agoMerge #5330
bors[bot] [Sun, 12 Jul 2020 09:57:11 +0000 (09:57 +0000)]
Merge #5330

5330: Fix ignore attribute autocompletion r=matklad a=avrong

Fixes #5232

<img width="273" alt="image" src="https://user-images.githubusercontent.com/6342851/87242025-a4782400-c431-11ea-91b7-5127f9742122.png">
<img width="238" alt="image" src="https://user-images.githubusercontent.com/6342851/87242044-c96c9700-c431-11ea-8161-f197f8e97ca0.png">

Co-authored-by: Aleksei Trifonov <avrong@avrong.me>
4 years agoMerge #5326
bors[bot] [Sun, 12 Jul 2020 09:45:37 +0000 (09:45 +0000)]
Merge #5326

5326: infer: Add type inference support for Union types r=flodiebold a=otavio

This adds the type inference to Union types and add a small test case
for it, ensuring it keeps working in future.

Fixes: #5277
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
----

#

Co-authored-by: Otavio Salvador <otavio@ossystems.com.br>
4 years agoFix ignore attribute autocompletion
Aleksei Trifonov [Sun, 12 Jul 2020 08:17:15 +0000 (11:17 +0300)]
Fix ignore attribute autocompletion

4 years agoMerge #5329
bors[bot] [Sun, 12 Jul 2020 00:24:50 +0000 (00:24 +0000)]
Merge #5329

5329: Comment decorations r=matklad a=matklad

closes #4461

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years agoComment decorations
Aleksey Kladov [Sun, 12 Jul 2020 00:23:41 +0000 (02:23 +0200)]
Comment decorations

closes #4461

4 years agoMerge #5328
bors[bot] [Sat, 11 Jul 2020 23:50:53 +0000 (23:50 +0000)]
Merge #5328

5328: change vis works on statics r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years agochange vis works on statics
Aleksey Kladov [Sat, 11 Jul 2020 23:49:51 +0000 (01:49 +0200)]
change vis works on statics

4 years agoMerge #5325
bors[bot] [Sat, 11 Jul 2020 22:36:53 +0000 (22:36 +0000)]
Merge #5325

5325: Update lsp-types to account for new CodeActionKind structure r=kjeremy a=kjeremy

Co-authored-by: Jeremy Kolb <kjeremy@gmail.com>
4 years agoinfer: Add type inference support for Union types
Otavio Salvador [Sat, 11 Jul 2020 22:28:07 +0000 (19:28 -0300)]
infer: Add type inference support for Union types

This adds the type inference to Union types and add a small test case
for it, ensuring it keeps working in future.

Fixes: #5277
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
4 years agoUpdate tests
Jeremy Kolb [Sat, 11 Jul 2020 22:23:08 +0000 (18:23 -0400)]
Update tests

4 years agoUpdate lsp-types to account for new CodeActionKind structure
Jeremy Kolb [Sat, 11 Jul 2020 21:29:45 +0000 (17:29 -0400)]
Update lsp-types to account for new CodeActionKind structure

4 years agoMerge #5324
bors[bot] [Sat, 11 Jul 2020 20:53:57 +0000 (20:53 +0000)]
Merge #5324

5324: Implementations lens for unions r=matklad a=matklad

closes #4728

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years agoImplementations lens for unions
Aleksey Kladov [Sat, 11 Jul 2020 20:48:56 +0000 (22:48 +0200)]
Implementations lens for unions

closes #4728

4 years agoMerge #5323
bors[bot] [Sat, 11 Jul 2020 20:13:07 +0000 (20:13 +0000)]
Merge #5323

5323: Rewrite item_tree tests to expect r=matklad a=matklad

insta review wouldn't update the test, so ...

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years agoRewrite item_tree tests to expect
Aleksey Kladov [Sat, 11 Jul 2020 20:11:31 +0000 (22:11 +0200)]
Rewrite item_tree tests to expect

insta review wouldn't update the test, so ...

4 years agoExtern fns are implicitly unsafe
Aleksey Kladov [Sat, 11 Jul 2020 19:53:32 +0000 (21:53 +0200)]
Extern fns are implicitly unsafe

closes #4865

4 years agoMerge #5320
bors[bot] [Sat, 11 Jul 2020 18:02:33 +0000 (18:02 +0000)]
Merge #5320

5320: Bump macro recursion limit in release r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years agoBump macro recursion limit in release
Aleksey Kladov [Sat, 11 Jul 2020 18:01:56 +0000 (20:01 +0200)]
Bump macro recursion limit in release

4 years agoMerge #5318
bors[bot] [Sat, 11 Jul 2020 16:40:56 +0000 (16:40 +0000)]
Merge #5318

5318: More tight recursion limit when expanding macros in function bodies r=matklad a=matklad

cc #4944
cc #5317

This doesn't fully close #4944 -- looks like we hit SO in syntax
highlighting, when we use `Semantics::expand_macro`.

Seems like we need to place expansion limit on the macro itself (store
it as a part of MacroCallId?)!

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years agoMore tight recursion limit when expanding macros in function bodies
Aleksey Kladov [Sat, 11 Jul 2020 16:35:35 +0000 (18:35 +0200)]
More tight recursion limit when expanding macros in function bodies

cc #4944
cc #5317

This doesn't fully close #4944 -- looks like we hit SO in syntax
highlighting, when we use `Semantics::expand_macro`.

Seems like we need to place expansion limit on the macro itself (store
it as a part of MacroCallId?)!

4 years agoMerge #5315
bors[bot] [Sat, 11 Jul 2020 12:59:04 +0000 (12:59 +0000)]
Merge #5315

5315: Minor r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years agoMinor
Aleksey Kladov [Sat, 11 Jul 2020 12:57:07 +0000 (14:57 +0200)]
Minor

4 years agoMerge #5314
bors[bot] [Sat, 11 Jul 2020 12:52:20 +0000 (12:52 +0000)]
Merge #5314

5314: Use dedicated semantic highlight tag for parameters r=matklad a=matklad

closes #5106

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
4 years agoUse dedicated semantic highlight tag for parameters
Aleksey Kladov [Sat, 11 Jul 2020 12:50:00 +0000 (14:50 +0200)]
Use dedicated semantic highlight tag for parameters

closes #5106

4 years agoMerge #5313
bors[bot] [Sat, 11 Jul 2020 11:31:32 +0000 (11:31 +0000)]
Merge #5313

5313: no doctests r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>