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
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
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
Maan2003
7f71000c12
Don't suggest Remove unused param in trait impls
2021-06-11 12:24:56 +05:30
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
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
Jonas Schievink
2c1ca98aba
Make MemoryUsage
work on Windows
2021-06-10 14:06:35 +02:00
Lukas Wirth
26c869ddc0
Don't classify attributes on macro-calls are the macro itself
2021-06-10 00:26:15 +02:00
bors[bot]
c6133fe51c
Merge #9195
...
9195: minor: Simplify r=Veykril a=Veykril
bors r+
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-06-09 21:45:35 +00:00
Lukas Wirth
20d26bd109
Simplify
2021-06-09 23:45:12 +02:00
Lukas Wirth
1e51b137d9
Remove unnecessary duplication
2021-06-09 18:42:01 +02:00
Lukas Wirth
ae8d74ab2c
Implement dummy expansions for builtin attributes
2021-06-09 18:27:08 +02:00
Jonas Schievink
d236fc6abe
Try to fix unique file names on Windows
2021-06-09 18:02:04 +02:00
Jonas Schievink
05b3a4bc93
Build test-macros in a build script
2021-06-09 17:16:52 +02:00
bors[bot]
5f592f4f58
Merge #9191
...
9191: fix: Don't descend MacroCall TokenTree delimiters r=jonas-schievink a=Veykril
Fixes #9190
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-06-09 13:17:38 +00:00
Lukas Wirth
3c40b15d62
Don't descend MacroCall TokenTree delimiters
2021-06-09 15:02:11 +02:00
bors[bot]
cc7cfc5d3d
Merge #9186
...
9186: fix: Prefer attr macros in "expand macro recursively" r=jonas-schievink a=jonas-schievink
This allows expanding attribute macros on fn-like macro invocations
bors r+
Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
2021-06-08 21:08:58 +00:00
bors[bot]
a60978d172
Merge #9183
...
9183: Fix typo r=lnicola a=phynalle
Co-authored-by: phynalle <phynalism@gmail.com>
2021-06-08 20:47:10 +00:00
Jonas Schievink
fcf22d68d4
Prefer attr macros in "expand macro recursively"
2021-06-08 22:26:01 +02:00
bors[bot]
f1a40f9093
Merge #9187
...
9187: fix: Fix edge case for ImportGranularity guessing r=Veykril a=Veykril
bors r+
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-06-08 20:18:54 +00:00
Lukas Wirth
31aad2528f
Fix edge case for ImportGranularity guessing
2021-06-08 22:14:30 +02:00
phynalle
e8a5fb434d
Fix typo
2021-06-09 04:51:28 +09:00
bors[bot]
b6199de706
Merge #9181 #9182
...
9181: Don't complete values in type position r=jonas-schievink a=Veykril
Will add some proper tests in a bit
9182: fix: don't complete derive macros as fn-like macros r=jonas-schievink a=jonas-schievink
Part of https://github.com/rust-analyzer/rust-analyzer/issues/8518
bors r+
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
2021-06-08 19:09:13 +00:00
Lukas Wirth
1a26af15ef
Add tests checking no value completion in type pos
2021-06-08 20:27:25 +02:00
Jonas Schievink
ee374ff1ee
fix: don't complete derive macros as fn-like macros
2021-06-08 17:31:47 +02:00
Lukas Wirth
1d74ef1d98
Don't complete values in type position
2021-06-08 16:50:10 +02:00
Jonas Schievink
8482329d65
source_to_def: skip items with no def
2021-06-08 16:42:48 +02:00
bors[bot]
590472607c
Merge #9171
...
9171: internal: simplify r=Veykril a=Veykril
bors r+
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-06-07 18:46:18 +00:00
Lukas Wirth
2987e05f15
simplify
2021-06-07 20:45:17 +02:00
bors[bot]
7f16b42188
Merge #9170
...
9170: internal: Remove unnecessary `completion::macro_in_item_position` module r=Veykril a=Veykril
bors r+
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-06-07 17:47:23 +00:00
Lukas Wirth
b29e8ed994
Remove unnecessary completion::macro_in_item_position
2021-06-07 19:46:25 +02:00