Commit graph

16364 commits

Author SHA1 Message Date
bors[bot]
2490ab7718
Merge #8254
8254: internal: switch from CLI to internal benchmarking r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2021-03-30 09:47:49 +00:00
Aleksey Kladov
797185e1b6 internal: switch from CLI to internal benchmarking
We have a CLI for benchmarking, but no one actually uses it it seems.
Let's try switching to "internal" benchmarks, implemented as rust tests.
They should be easier to "script" to automate tracking of perf
regressions.
2021-03-30 12:47:23 +03:00
bors[bot]
904bdff224
Merge #8250
8250: More accurately classify assoc. types in paths r=jonas-schievink a=jonas-schievink

Previously `Iterator<Whoops$0 = ()>` would go to the `Iterator` trait. This fixes that and correctly marks `Whoops` as unresolved.

bors r+

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
2021-03-30 00:10:30 +00:00
Jonas Schievink
41c7448e12 Accurately classify assoc. types in paths 2021-03-30 02:09:17 +02:00
bors[bot]
b3ca06e4fd
Merge #8247
8247: internal: ensure that runaway type-inference doesn't block the main loop r=flodiebold a=matklad

We have a bug where type-checking `per_query_memory_usage` takes a
couple of seconds. It also reveals another bug: our type inference is
not cancellable.

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2021-03-29 20:39:36 +00:00
bors[bot]
9bae3ecdff
Merge #8246
8246: update vim ycm installation instruction r=Veykril a=PSeitz

Fixes https://github.com/rust-analyzer/rust-analyzer.github.io/pull/97

Co-authored-by: PSeitz <PSeitz@users.noreply.github.com>
2021-03-29 20:18:51 +00:00
Aleksey Kladov
b35312d4af internal: ensure that runaway type-inference doesn't block the main loop
We have a bug where type-checking `per_query_memory_usage` takes a
couple of seconds. It also reveals another bug: our type inference is
not cancellable.
2021-03-29 23:15:12 +03:00
PSeitz
14a1f0ce46
remove enumeration 2021-03-29 22:09:04 +02:00
PSeitz
3153a80261
update vim ycm installation instruction 2021-03-29 21:31:29 +02:00
bors[bot]
35efbf5661
Merge #8244
8244: internal: track missing `.check_cancelled` r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2021-03-29 19:22:11 +00:00
Aleksey Kladov
483a5bc9c8 internal: track missing .check_cancelled 2021-03-29 21:38:23 +03:00
bors[bot]
7b9e2a2641
Merge #8243
8243: Remove code duplication in highlight injection r=Veykril a=Veykril

bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-03-29 18:18:40 +00:00
Lukas Wirth
6b8358d4d9 Remove code duplication in highlight injection 2021-03-29 20:11:28 +02:00
bors[bot]
95107a7ccf
Merge #8241
8241: internal: cleanup hprof r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2021-03-29 17:54:57 +00:00
Aleksey Kladov
2381a54c2f internal: cleanup hprof 2021-03-29 20:54:15 +03:00
Lukas Wirth
b4bb774381 Remove TraitRef::Error 2021-03-29 18:41:21 +02:00
Lukas Wirth
c2a63b97a8 Rename target_ty to self_ty 2021-03-29 17:47:47 +02:00
Lukas Wirth
bb6e1bf811 Lower traits to TraitRef instead of TypeRef 2021-03-29 17:11:28 +02:00
ivan770
f9d17c6d7c
Apply test style fixes to all empty remove_dbg tests 2021-03-29 16:00:09 +02:00
ivan770
8e5611442e
Update crates/ide_assists/src/handlers/remove_dbg.rs
Apply standard test style fixes

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2021-03-29 16:52:30 +03:00
bors[bot]
5dd6b93138
Merge #8231
8231: Fold consecutive consts and statics r=matklad a=MozarellaMan

PR to implement #8114

![const_fold](https://user-images.githubusercontent.com/48062697/112835083-b584c600-9090-11eb-968a-a95f4e9c1f6c.gif)


Co-authored-by: Ayomide Bamidele <ayoeze@hotmail.com>
2021-03-29 13:40:55 +00:00
bors[bot]
c9810b9b55
Merge #8237
8237: README: drop "experimental" r=jonas-schievink a=jonas-schievink

rust-analyzer is not very experimental anymore, so let's drop that.

bors r+

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
2021-03-29 13:30:57 +00:00
Jonas Schievink
395d6cb765 README: drop "experimental" 2021-03-29 15:29:11 +02:00
bors[bot]
80ebd0108c
Merge #8235
8235: internal: make --log-file more discoverable r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2021-03-29 12:12:36 +00:00
Aleksey Kladov
b352b90c86 internal: make --log-file more discoverable 2021-03-29 15:11:31 +03:00
Ayomide Bamidele
8e11796dc5 formatting fix 2021-03-29 12:56:02 +01:00
Jonas Schievink
3c6c1c99b4 Don't use snippets 2021-03-29 13:23:07 +02:00
Ayomide Bamidele
a813062ed2 Folding range for statics 2021-03-29 12:20:26 +01:00
Jonas Schievink
8c1092455e Use find_node_at_range 2021-03-29 13:17:49 +02:00
Ayomide Bamidele
391be07298 Folding range for consts 2021-03-29 12:17:19 +01:00
Ayomide Bamidele
23601454fe New FoldKinds - Consts, Statics 2021-03-29 11:49:14 +01:00
Ayomide Bamidele
f6702dda9a Test cases for folding consts and statics 2021-03-29 11:43:03 +01:00
bors[bot]
ae7de296ae
Merge #8222
8222: Don't mark unlinked file diagnostic as unused r=lnicola a=jonas-schievink

Fixes https://github.com/rust-analyzer/rust-analyzer/issues/8215, at least on VS Code

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
2021-03-29 07:30:28 +00:00
bors[bot]
bb1d925dab
Merge #8212
8212: Basic support macro 2.0 r=jonas-schievink a=edwin0cheng

Turn out it is quite straight forward :)

r @jonas-schievink 

![m2](https://user-images.githubusercontent.com/11014119/112712565-6eb99380-8f0b-11eb-88de-5d7f974dfe6d.png)


Co-authored-by: Edwin Cheng <edwin0cheng@gmail.com>
2021-03-28 15:43:11 +00:00
Edwin Cheng
7729879118 Remove unused test fixtures 2021-03-28 10:41:18 +08:00
Jonas Schievink
bd18e5fa87 Don't mark unlinked file diagnostic as unused 2021-03-28 03:56:03 +02:00
bors[bot]
ce6bb5ccca
Merge #8221
8221: Prefer adding `mod` declaration to lib.rs over file.rs in UnlinkedFile fix r=Veykril a=Veykril

When there is a `lib.rs` and `main.rs` in one crate, one usually wants the `lib.rs` file to declare the modules.
bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-03-27 22:43:34 +00:00
Lukas Wirth
c9e479870b Prefer add mod declaration to lib.rs over file.rs in UnlinkedFile fix 2021-03-27 23:43:07 +01:00
bors[bot]
84f1660a37
Merge #8220
8220: Reorder some ide_db imports r=Veykril a=Veykril

bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-03-27 21:13:08 +00:00
Lukas Wirth
1ef55002c2 Cleanup ide_db imports 2021-03-27 21:51:00 +01:00
Jonas Schievink
e6580aa380 Use const instead of let 2021-03-27 19:02:08 +01:00
Jonas Schievink
b494e47920 Snippet support in extract_type_alias 2021-03-27 18:53:13 +01:00
Jonas Schievink
201fbac8a9 Fix handling of multi-cursor snippets
This allows one snippet per TextEdit, multiple in the same TextEdit
are still broken
2021-03-27 18:50:55 +01:00
ivan770
665266bf66
Replace empty dbg with unit in letexprs, better removal in blocks 2021-03-27 17:34:35 +02:00
bors[bot]
97dbbad482
Merge #8214
8214: Mention the rustup version in the manual r=lnicola a=lnicola

Closes #7860

bors r+

changelog fix mention the `rustup` version in the installation instructions.

Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
2021-03-27 10:40:25 +00:00
Laurențiu Nicola
ea8159893a Mention the rustup version in the manual 2021-03-27 12:39:16 +02:00
bors[bot]
ae92014319
Merge #8213
8213: Added support for const generics in impl generation r=Veykril a=ivan770

Closes #8211

Co-authored-by: ivan770 <leshenko.ivan770@gmail.com>
2021-03-27 10:00:37 +00:00
ivan770
5a2ef8d0ca
Added support for const generics in impl generation 2021-03-27 11:37:39 +02:00
ivan770
0a5badbcba
Replace match on option with if 2021-03-27 11:17:17 +02:00
ivan770
c7cd0aff4a
Remove dbg expression and newline as whole 2021-03-27 11:10:20 +02:00