Maan2003
6cc6dee9e9
clippy::useless_conversion
2021-06-13 09:25:55 +05:30
Maan2003
c9b4ac5be4
clippy::redudant_borrow
2021-06-13 09:24:16 +05:30
bors[bot]
d6737e55fb
Merge #9239
...
9239: fix: Fix coercion in match with expected type r=flodiebold a=flodiebold
Plus add infrastructure to test type mismatches without expect.
CC #8961
Co-authored-by: Florian Diebold <flodiebold@gmail.com>
2021-06-12 21:05:12 +00:00
Florian Diebold
20487a1b4a
Fix coercion in match with expected type
...
Plus add infrastructure to test type mismatches without expect.
2021-06-12 23:04:43 +02:00
bors[bot]
7bbb3e34d5
Merge #9238
...
9238: internal: cross-crate cov-marks r=matklad a=matklad
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2021-06-12 20:42:46 +00:00
Aleksey Kladov
0463d76a1f
internal: cross-crate cov-marks
2021-06-12 23:40:52 +03:00
bors[bot]
124123a53b
Merge #9237
...
9237: internal: move diagnostics infra to hir r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2021-06-12 19:05:58 +00:00
Aleksey Kladov
7731714578
internal: move diagnostics infra to hir
2021-06-12 22:05:23 +03:00
bors[bot]
907d4c3e95
Merge #9236
...
9236: Fix some typos in flyimport docs r=SomeoneToIgnore a=SomeoneToIgnore
bors r+
Co-authored-by: Kirill Bulatov <mail4score@gmail.com>
2021-06-12 18:51:42 +00:00
Kirill Bulatov
9c0b141dc9
Fix some typos in flyimport docs
2021-06-12 21:51:09 +03:00
bors[bot]
85d2cd331f
Merge #9233
...
9233: Move some hir_ty diagnostics to hir r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2021-06-12 18:01:00 +00:00
Aleksey Kladov
6940cfed1e
Move some hir_ty diagnostics to hir
2021-06-12 21:00:22 +03:00
bors[bot]
10ca6b286c
Merge #9231
...
9231: minor: optimize r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2021-06-12 14:50:37 +00:00
Aleksey Kladov
6f0141a140
minor: optimize
...
We shouldn't be looking at the source map unless we actually have
diagnostics.
2021-06-12 17:49:41 +03:00
Aleksey Kladov
1b1e3de988
minor: reduce visibility
2021-06-12 17:41:47 +03:00
bors[bot]
f9e67d692d
Merge #9230
...
9230: internal: move inference diagnostics to hir r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2021-06-12 14:40:28 +00:00
Aleksey Kladov
0413d51317
internal: move missing unsafe diagnostic to hir
2021-06-12 17:39:46 +03:00
Aleksey Kladov
f8009666be
internal: move inference diagnostics to hir
2021-06-12 17:17:23 +03:00
bors[bot]
c1c2c92e47
Merge #9229
...
9229: minor: squelch "unused" warning r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2021-06-12 12:56:58 +00:00
Aleksey Kladov
787d980c71
minor: squelch "unused" warning
2021-06-12 15:10:07 +03:00
bors[bot]
409f5fb563
Merge #9204
...
9204: feat: more accurate memory usage info on glibc Linux r=jonas-schievink a=jonas-schievink
This adds support for the new `mallinfo2` API added in glibc 2.33. It addresses a shortcoming in the `mallinfo` API where it was unable to handle memory usage of more than 2 GB, which we sometimes exceed.
Blocked on https://github.com/rust-lang/libc/pull/2228
Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
2021-06-11 22:00:23 +00:00
Jonas Schievink
74dc9bb0e9
Update libc
2021-06-11 23:55:27 +02:00
bors[bot]
72ea02869b
Merge #9223
...
9223: Complete associated types in dyn and impl trait r=Veykril a=Veykril
Fixes #9222
bors r+
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-06-11 21:13:28 +00:00
Lukas Wirth
ec9ef9c283
Complete associated types in dyn and impl trait
2021-06-11 23:12:30 +02:00
bors[bot]
187d55a25e
Merge #9221
...
9221: fix: Highlight tuple field accesses correctly r=Veykril a=Veykril
Fixes #9220
bors r+
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-06-11 19:20:24 +00:00
Lukas Wirth
e09723f0af
Highlight tuple field accesses correctly
2021-06-11 21:19:19 +02:00
bors[bot]
863e23f00f
Merge #9219
...
9219: minor: Replace some AssocItem::containing_trait calls trait_or_trait_impl r=Veykril a=Veykril
bors r+
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-06-11 17:56:00 +00:00
Lukas Wirth
db4a1fcab4
Replace some AssocItem::containing_trait calls trait_or_trait_impl
2021-06-11 19:55:24 +02:00
bors[bot]
21d4416235
Merge #9218
...
9218: Item search now respects trait impl items r=Veykril a=Veykril
Fixes #2977
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-06-11 17:33:34 +00:00
Lukas Wirth
48f65b3b15
Item search now respects trait impl items
2021-06-11 19:24:52 +02:00
bors[bot]
6ac3e666b7
Merge #9217
...
9217: internal: Don't stringify and reparse `cfg_attr`-gated attributes r=jonas-schievink a=jonas-schievink
Bumps ungrammar to include https://github.com/rust-analyzer/ungrammar/pull/33
bors r+
Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
2021-06-11 16:35:38 +00:00
Jonas Schievink
99d40e7a3a
Don't stringify cfg_attr
-gated attributes
...
This preserves the assigned `TokenId`s
2021-06-11 18:34:30 +02:00
Jonas Schievink
1d6eef1350
Update ungrammar
2021-06-11 18:34:30 +02:00
bors[bot]
5f69420ee3
Merge #9216
...
9216: fix: Don't allow lookup by self for unprefixed self access completions r=Veykril a=Veykril
Fixes #9211
bors r+
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-06-11 16:27:42 +00:00
Lukas Wirth
4e588dfd88
Don't allow lookup by self for unprefixed self access completions
2021-06-11 18:26:52 +02:00
bors[bot]
80b3b74018
Merge #9215
...
9215: change visibility for use and macro items r=jonas-schievink a=Maan2003
Co-authored-by: Maan2003 <manmeetmann2003@gmail.com>
2021-06-11 14:10:22 +00:00
Maan2003
4c1a02288c
change visibility for use and macro items
2021-06-11 19:10:56 +05:30
bors[bot]
050232a37e
Merge #9192
...
9192: internal: Build test-macros in a build script r=jonas-schievink a=jonas-schievink
This build the test-proc-macros in `proc_macro_test` in a build script, and copies the artifact to `OUT_DIR`. This should make it available throughout all of rust-analyzer at no cost other than depending on `proc_macro_test`, fixing https://github.com/rust-analyzer/rust-analyzer/issues/9067 .
This hopefully will let us later write inline tests that utilize proc macros, which makes my life fixing proc macro bugs easier.
Opening this as a sort of RFC, because I'm not totally sure this approach is the best.
Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
2021-06-11 10:44:07 +00:00
bors[bot]
de9e989cf4
Merge #9209
...
9209: Don't suggest Remove unused param in trait impls r=Veykril a=Maan2003
See the added test for description
Co-authored-by: Maan2003 <manmeetmann2003@gmail.com>
2021-06-11 10:05:28 +00:00
Maan2003
7f71000c12
Don't suggest Remove unused param in trait impls
2021-06-11 12:24:56 +05:30
bors[bot]
c62ec3d998
Merge #9208
...
9208: minor: Populate import maps eagerly to speed up flyimports r=SomeoneToIgnore a=SomeoneToIgnore
Part of #7542
Follow up of https://github.com/rust-analyzer/rust-analyzer/pull/9206#issuecomment-859097783
Reduces `import_on_the_fly @ sel` case in the `integrated_completion_benchmark` by ~300ms.
Also enables cache priming for manual workspace loading to reflect the results in the benchmarks.
Before:
<img width="1198" alt="image" src="https://user-images.githubusercontent.com/2690773/121606148-4a734a80-ca56-11eb-812a-7955e93817f1.png ">
After:
<img width="1200" alt="image" src="https://user-images.githubusercontent.com/2690773/121606156-4e06d180-ca56-11eb-891b-1ed878b53d7e.png ">
Co-authored-by: Kirill Bulatov <mail4score@gmail.com>
2021-06-11 06:28:32 +00:00
Kirill Bulatov
339448157c
Only prefill caches in the completion benchmark
2021-06-11 09:27:25 +03:00
Kirill Bulatov
b24f816c0d
Fix visibility issues
2021-06-11 02:00:05 +03:00
Kirill Bulatov
ba65d259de
Prime caches on workspace load
2021-06-11 02:00:03 +03:00
Kirill Bulatov
a6cdde0d0b
Populate import maps eagerly
2021-06-11 01:27:20 +03:00
bors[bot]
c4c1fcb8e9
Merge #9206
...
9206: minor: Speed up fst items lookup during completions r=SomeoneToIgnore a=SomeoneToIgnore
Part of https://github.com/rust-analyzer/rust-analyzer/issues/7542
A number of profile calls added for `import_on_the_fly` contents.
Before:
<img width="606" alt="Screenshot 2021-06-11 at 00 19 13" src="https://user-images.githubusercontent.com/2690773/121598998-22321e80-ca4b-11eb-9a3d-dc9cb2936705.png ">
After:
<img width="859" alt="Screenshot 2021-06-11 at 00 19 27" src="https://user-images.githubusercontent.com/2690773/121599022-2a8a5980-ca4b-11eb-82b6-13ab0ed56d58.png ">
As a result, low hanging fruit was spotted: crazy amount of `fst_path` calls. Reducing that won ~200ms in the `import_on_the_fly @ sel` case in the `integrated_completion_benchmark`:
<img width="861" alt="Screenshot 2021-06-11 at 00 19 38" src="https://user-images.githubusercontent.com/2690773/121599277-7d641100-ca4b-11eb-8667-53206994de27.png ">
I'm not sure how to proceed with the remaining `???` marks in such methods as `collect_import_map` though: there's nothing but library calls in cycles, but maybe I'll come up with something later.
Co-authored-by: Kirill Bulatov <mail4score@gmail.com>
2021-06-10 21:28:14 +00:00
Kirill Bulatov
690cd95327
Reduce fst_path calls
2021-06-11 00:10:09 +03:00
Kirill Bulatov
3aaf07b8cb
Add more profiling for flyimports
2021-06-10 23:43:46 +03:00
Jonas Schievink
35b18b2725
Add support for mallinfo2 on glibc Linux
2021-06-10 14:58:52 +02:00
bors[bot]
f4da4de7cd
Merge #9202
...
9202: feat: Make `MemoryUsage` work on Windows r=jonas-schievink a=jonas-schievink
Unfortunately there is no convenient API for heap statistics, so this instead uses the Commit Charge value, which is the amount of memory that needs to be allocated either in physical RAM or in the page file. This approximation seems to be good enough to find queries that waste a large amount of memory, but it should generally be expected to be off by several MB.
bors r+
Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
2021-06-10 12:09:54 +00:00