]>
git.lizzy.rs Git - rust.git/log
Lukas Wirth [Tue, 22 Jun 2021 10:03:51 +0000 (12:03 +0200)]
Prefer identifier tokens in expand_macro
bors[bot] [Sat, 19 Jun 2021 09:18:34 +0000 (09:18 +0000)]
Merge #9338
9338: minor: use minicore r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Sat, 19 Jun 2021 09:03:59 +0000 (12:03 +0300)]
minor: use minicore
bors[bot] [Fri, 18 Jun 2021 21:58:35 +0000 (21:58 +0000)]
Merge #9335
9335: feat: Don't insert imports outside of cfg attributed items r=Veykril a=Veykril
Closes #6939
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
Lukas Wirth [Fri, 18 Jun 2021 21:53:41 +0000 (23:53 +0200)]
Don't insert imports outside of cfg attributed items
bors[bot] [Fri, 18 Jun 2021 21:23:22 +0000 (21:23 +0000)]
Merge #9334
9334: feat: Allow to disable import insertion on single path glob imports r=Veykril a=Veykril
On by default as I feel like this is something the majority would prefer.
Closes #8490
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
Lukas Wirth [Fri, 18 Jun 2021 21:11:56 +0000 (23:11 +0200)]
Allow to disable import insertion on single path glob imports
bors[bot] [Fri, 18 Jun 2021 21:00:24 +0000 (21:00 +0000)]
Merge #9333
9333: minor: use minicore r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Fri, 18 Jun 2021 20:56:15 +0000 (23:56 +0300)]
minor: use minicore
bors[bot] [Fri, 18 Jun 2021 20:49:31 +0000 (20:49 +0000)]
Merge #9332
9332: minor: use minicore r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Fri, 18 Jun 2021 20:48:18 +0000 (23:48 +0300)]
minor: use minicore
Aleksey Kladov [Fri, 18 Jun 2021 20:38:19 +0000 (23:38 +0300)]
minor: use minicore
Aleksey Kladov [Fri, 18 Jun 2021 20:33:01 +0000 (23:33 +0300)]
minor: use minicore
Aleksey Kladov [Fri, 18 Jun 2021 20:28:37 +0000 (23:28 +0300)]
minor: use minicore
bors[bot] [Fri, 18 Jun 2021 19:47:46 +0000 (19:47 +0000)]
Merge #9331
9331: internal: add index to minicore r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Fri, 18 Jun 2021 19:47:02 +0000 (22:47 +0300)]
internal: use minicore deref more
Aleksey Kladov [Fri, 18 Jun 2021 19:37:03 +0000 (22:37 +0300)]
internal: add index to minicore
bors[bot] [Fri, 18 Jun 2021 19:26:08 +0000 (19:26 +0000)]
Merge #9330
9330: minor: use minicore r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Fri, 18 Jun 2021 19:24:48 +0000 (22:24 +0300)]
minor: use minicore
Aleksey Kladov [Fri, 18 Jun 2021 19:14:39 +0000 (22:14 +0300)]
minor: use minicore
bors[bot] [Fri, 18 Jun 2021 19:11:13 +0000 (19:11 +0000)]
Merge #9329
9329: internal: add Copy to minicore r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Fri, 18 Jun 2021 19:10:29 +0000 (22:10 +0300)]
internal: add Copy to minicore
bors[bot] [Fri, 18 Jun 2021 18:10:52 +0000 (18:10 +0000)]
Merge #9327
9327: Update css-what r=kjeremy a=kjeremy
npm audit flagged our version of css-what
Co-authored-by: kjeremy <kjeremy@gmail.com>
kjeremy [Fri, 18 Jun 2021 17:57:48 +0000 (13:57 -0400)]
Update css-what
npm audit flagged out version of css-what
bors[bot] [Fri, 18 Jun 2021 16:47:58 +0000 (16:47 +0000)]
Merge #9321
9321: Inline generics in const and function trait completions r=Veykril a=RDambrosio016
This PR does a couple of things:
- moves path_transform from ide_assists to ide_db to be shared by both assists and completions
- when completing a const or a function for a trait, it will "inline" any generics in those associated items instead
of leaving the generic's name. For example:
```rust
trait Foo<T> {
const BAR: T;
fn foo() -> T;
}
struct Bar;
impl Foo<u32> for Bar {
// autocompletes to this
fn foo() -> u32;
// and not this (old)
fn foo() -> T;
// also works for associated consts and where clauses
const BAR: u32 = /* */
}
```
Currently this does not work for const generics, because `PathTransform` does not seem to account for them. If this should work on const generics too, `PathTransform` will need to be changed. However, it is uncommon to implement a trait only for a single const value, so this isnt a huge concern.
Co-authored-by: rdambrosio <rdambrosio016@gmail.com>
rdambrosio [Fri, 18 Jun 2021 16:42:13 +0000 (12:42 -0400)]
Lift ast -> hir out of the for_each
bors[bot] [Fri, 18 Jun 2021 12:18:25 +0000 (12:18 +0000)]
Merge #9325
9325: Minor: clippy perf fixes r=matklad a=lnicola
Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
bors[bot] [Fri, 18 Jun 2021 11:48:01 +0000 (11:48 +0000)]
Merge #9326
9326: Minor: Fix line numbering in tidy r=lnicola a=lnicola
bors r+
Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
Laurențiu Nicola [Fri, 18 Jun 2021 11:47:26 +0000 (14:47 +0300)]
Fix line numbering in tidy
Laurențiu Nicola [Fri, 18 Jun 2021 11:44:36 +0000 (14:44 +0300)]
Avoid string allocation
Laurențiu Nicola [Fri, 18 Jun 2021 11:40:51 +0000 (14:40 +0300)]
Minor clippy perf fixes
rdambrosio [Fri, 18 Jun 2021 06:14:00 +0000 (02:14 -0400)]
Remove extra whitespace
rdambrosio [Thu, 17 Jun 2021 23:54:28 +0000 (19:54 -0400)]
Feat: inline generics in const and func trait completions
bors[bot] [Thu, 17 Jun 2021 22:30:30 +0000 (22:30 +0000)]
Merge #9313
9313: fix: Don't complete keywords in attributes inside expressions r=Veykril a=Veykril
bors r+
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
bors[bot] [Thu, 17 Jun 2021 21:44:44 +0000 (21:44 +0000)]
Merge #9320
9320: internal: retire famous_defs_fixture r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Thu, 17 Jun 2021 21:42:32 +0000 (00:42 +0300)]
internal: retire famous_defs_fixture
This is now done declaratively via `minicore`.
Aleksey Kladov [Thu, 17 Jun 2021 21:36:25 +0000 (00:36 +0300)]
minor: simplify
bors[bot] [Thu, 17 Jun 2021 21:31:05 +0000 (21:31 +0000)]
Merge #9319
9319: internal: add derive and ord support to minicore r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Thu, 17 Jun 2021 21:30:22 +0000 (00:30 +0300)]
internal: add derive and ord support to minicore
bors[bot] [Thu, 17 Jun 2021 19:22:48 +0000 (19:22 +0000)]
Merge #9318
9318: feat: Complete `repr` attribute parameters r=Veykril a=Veykril
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
Lukas Wirth [Thu, 17 Jun 2021 19:15:35 +0000 (21:15 +0200)]
Complete `repr` attribute parameters
bors[bot] [Thu, 17 Jun 2021 18:04:38 +0000 (18:04 +0000)]
Merge #9317
9317: internal: add From to minicore r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Thu, 17 Jun 2021 17:58:05 +0000 (20:58 +0300)]
internal: add From to minicore
Aleksey Kladov [Thu, 17 Jun 2021 17:51:34 +0000 (20:51 +0300)]
minor: dead code
bors[bot] [Thu, 17 Jun 2021 17:50:15 +0000 (17:50 +0000)]
Merge #9316
9316: internal: add default to minicore r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Thu, 17 Jun 2021 17:49:49 +0000 (20:49 +0300)]
internal: add default to minicore
bors[bot] [Thu, 17 Jun 2021 16:22:32 +0000 (16:22 +0000)]
Merge #9315
9315: Nest all the or-patterns! r=Veykril a=Veykril
`cargo +nightly clippy --fix -Z unstable-options --allow-dirty -- -A clippy::all -D clippy::unnested_or_patterns`
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
Lukas Wirth [Thu, 17 Jun 2021 16:09:44 +0000 (18:09 +0200)]
Fix parser tests for 1.53
Lukas Wirth [Thu, 17 Jun 2021 15:46:06 +0000 (17:46 +0200)]
simplify
Lukas Wirth [Thu, 17 Jun 2021 15:37:14 +0000 (17:37 +0200)]
Nest all the or-patterns!
Lukas Wirth [Thu, 17 Jun 2021 13:54:59 +0000 (15:54 +0200)]
Don't complete keywords in attributes inside expressions
bors[bot] [Thu, 17 Jun 2021 13:44:38 +0000 (13:44 +0000)]
Merge #9312
9312: internal: Move out item specific completion tests r=Veykril a=Veykril
bors r+
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
Lukas Wirth [Thu, 17 Jun 2021 13:43:21 +0000 (15:43 +0200)]
Correct completions in items tests
Lukas Wirth [Thu, 17 Jun 2021 13:32:34 +0000 (15:32 +0200)]
Move item specific completion tests
Lukas Wirth [Thu, 17 Jun 2021 13:10:25 +0000 (15:10 +0200)]
Less filtering in completion tests
bors[bot] [Thu, 17 Jun 2021 12:01:43 +0000 (12:01 +0000)]
Merge #9310
9310: internal: Refine and test UseTree completions r=Veykril a=Veykril
bors r+
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
Lukas Wirth [Thu, 17 Jun 2021 11:59:31 +0000 (13:59 +0200)]
Fix incorrect completions in empty braced use statement
Lukas Wirth [Thu, 17 Jun 2021 11:56:55 +0000 (13:56 +0200)]
Refine `self`, `super` and `crate` completion in use paths
Lukas Wirth [Thu, 17 Jun 2021 11:13:12 +0000 (13:13 +0200)]
Move out and rewrite UseTree completion tests
bors[bot] [Thu, 17 Jun 2021 10:10:25 +0000 (10:10 +0000)]
Merge #9308
9308: fix: Create modules in correct directory for nested modules in move_module assist r=Veykril a=Veykril
bors r+
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
Lukas Wirth [Thu, 17 Jun 2021 10:09:28 +0000 (12:09 +0200)]
Create modules in correct directory for nested modules in move_module assist
bors[bot] [Thu, 17 Jun 2021 08:52:15 +0000 (08:52 +0000)]
Merge #9307
9307: internal: switch some tests to minicore r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Thu, 17 Jun 2021 08:42:43 +0000 (11:42 +0300)]
internal: remove dead code
Aleksey Kladov [Thu, 17 Jun 2021 08:41:36 +0000 (11:41 +0300)]
internal: switch some tests to minicore
bors[bot] [Thu, 17 Jun 2021 08:30:08 +0000 (08:30 +0000)]
Merge #9306
9306: internal: minimize minicore r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Thu, 17 Jun 2021 08:28:44 +0000 (11:28 +0300)]
internal: minimize minicore
We want to keep minicore small, so let's split out iterator adapters and
sources into a separate `iterators` region, and use them only when
needed.
Aleksey Kladov [Thu, 17 Jun 2021 08:18:37 +0000 (11:18 +0300)]
internal: switch some tests to minicore
bors[bot] [Wed, 16 Jun 2021 20:28:23 +0000 (20:28 +0000)]
Merge #9304
9304: internal: cleanup tests r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Wed, 16 Jun 2021 20:27:04 +0000 (23:27 +0300)]
internal: cleanup tests
Aleksey Kladov [Wed, 16 Jun 2021 19:54:57 +0000 (22:54 +0300)]
internal: switch some tests to minicore
bors[bot] [Wed, 16 Jun 2021 19:53:43 +0000 (19:53 +0000)]
Merge #9301
9301: internal: Start refactoring ide_completion tests r=Veykril a=Veykril
Our current completion test infra resovles around usually just checking a specific `CompletionKind` which is suboptimal. We only see what we want to see in tests with this causing us to miss a lot of incorrect completions we are doing. Instead we should test for different cursor locations for all kinds(sans the magic kind maybe? not sure yet). This way we will also see potential duplicate completions that merely different in their kind.
Also since most completion submodules complete things in tests of other modules due to the tests overlapping it makes more sense to group these tests differently which implies moving them to a new module. Exceptions for this might be stuff like attribute completion as these cannot currently interfere.
I only wrote a few tests to check for completions in `ItemList` position so far and I already found a few incorrect/irrelevant completions as these haven't been tested properly due to them being hidden by the `CompletionKind` filtering.
I think `CompletionKind` doesn't really seem to be beneficial to me as to I can't think of a occasion where we would want to only check a specific completion kind.
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
Lukas Wirth [Wed, 16 Jun 2021 19:45:02 +0000 (21:45 +0200)]
Move test_utils into tests module
Lukas Wirth [Wed, 16 Jun 2021 16:50:18 +0000 (18:50 +0200)]
Don't complete paths after attributes
Lukas Wirth [Wed, 16 Jun 2021 15:56:04 +0000 (17:56 +0200)]
Don't show incorrect completions after unsafe or visiblity node
Lukas Wirth [Wed, 16 Jun 2021 15:45:58 +0000 (17:45 +0200)]
Don't complete visibility accessors after existing ones
Lukas Wirth [Wed, 16 Jun 2021 15:37:23 +0000 (17:37 +0200)]
Start refactoring ide_completion tests
Aleksey Kladov [Wed, 16 Jun 2021 19:48:48 +0000 (22:48 +0300)]
internal: add iterator to minicore
Aleksey Kladov [Wed, 16 Jun 2021 19:26:46 +0000 (22:26 +0300)]
internal: switch some tests to minicore
Aleksey Kladov [Wed, 16 Jun 2021 19:24:11 +0000 (22:24 +0300)]
internal: switch some tests to minicore
bors[bot] [Wed, 16 Jun 2021 17:28:13 +0000 (17:28 +0000)]
Merge #9302
9302: internal: Add builtin derives to attribute completion fixtures r=Veykril a=Veykril
bors R+
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
Lukas Wirth [Wed, 16 Jun 2021 17:27:06 +0000 (19:27 +0200)]
Don't complete already used derive attributes
Lukas Wirth [Wed, 16 Jun 2021 17:25:09 +0000 (19:25 +0200)]
Add builtin derives to attribute completion fixtures
bors[bot] [Wed, 16 Jun 2021 14:53:06 +0000 (14:53 +0000)]
Merge #9258
9258: minor: Give `ImportPrefix` variants better config names r=matklad a=Veykril
I feel like `crate` and `self` work better than `by_crate` and `by_self`. The only reason for the current names were that `Self` doesn't work for the variant name on the rust side so I forgot about setting proper config names on serde layer.
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
bors[bot] [Wed, 16 Jun 2021 13:52:15 +0000 (13:52 +0000)]
Merge #9300
9300: minor: Simplify r=Veykril a=Veykril
bors r+
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
Lukas Wirth [Wed, 16 Jun 2021 13:46:58 +0000 (15:46 +0200)]
Simplify
bors[bot] [Wed, 16 Jun 2021 13:10:44 +0000 (13:10 +0000)]
Merge #9299
9299: minor: Filter out non-type completions in the respective completions modules instead r=Veykril a=Veykril
bors r+
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
Lukas Wirth [Wed, 16 Jun 2021 13:08:44 +0000 (15:08 +0200)]
Filter out non-type completions in the respective completions modules instead
bors[bot] [Wed, 16 Jun 2021 09:21:29 +0000 (09:21 +0000)]
Merge #9297
9297: internal: add fn to minicore r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Wed, 16 Jun 2021 07:48:07 +0000 (10:48 +0300)]
internal: add fn to minicore
Aleksey Kladov [Wed, 16 Jun 2021 07:30:29 +0000 (10:30 +0300)]
internal: add deref_mut to minicore
bors[bot] [Tue, 15 Jun 2021 20:45:54 +0000 (20:45 +0000)]
Merge #9267 #9279
9267: fix: Code: update the LSP server without asking r=matklad a=lnicola
Most LSP extensions seem to do the same thing, and this is causing some
confusion for users who don't notice the update prompt before Code hides
it.
9279: minor: Document installation via Homebrew r=matklad a=Svetlitski
`rust-analyzer` can be installed via [Homebrew](https://brew.sh) (AKA`brew`) on macOS. I've added instructions on how to do so to the documentation. Additionally, I added a `.gitignore` rule to ignore the HTML documentation produced by `asciidoctor manual.adoc` so that it is not accidentally checked into `git`.
Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
Co-authored-by: Kevin Svetlitski <kevin_svetlitski@berkeley.edu>
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Tue, 15 Jun 2021 20:40:07 +0000 (23:40 +0300)]
Update docs/user/manual.adoc
bors[bot] [Tue, 15 Jun 2021 20:38:29 +0000 (20:38 +0000)]
Merge #9293
9293: fix: Show diagnostic fixes before assists r=matklad a=lnicola
Closes #9212
Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
bors[bot] [Tue, 15 Jun 2021 20:14:36 +0000 (20:14 +0000)]
Merge #9294
9294: internal: introduce minicore -- a subset of libcore for testing r=matklad a=matklad
Clearly, we need one more fixed point iteration loop!
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Tue, 15 Jun 2021 20:11:53 +0000 (23:11 +0300)]
internal: switch some tests to minicore
Aleksey Kladov [Tue, 15 Jun 2021 20:07:25 +0000 (23:07 +0300)]
internal: add result to minicore
bors[bot] [Tue, 15 Jun 2021 20:05:07 +0000 (20:05 +0000)]
Merge #9292
9292: fix: Code: clean-up #8951 r=wxb1ank a=wxb1ank
#8951 was a major change in the VS Code extension and caused quite a few problems. This PR is a catch-all for bugs and improvements in the new code.
This should fix:
- #9284
- [this unreported bug](https://github.com/rust-analyzer/rust-analyzer/pull/8951/files#r651570446)
- ...and one or two uncaught exceptions I just found
The original lack of testing was my own fault, but this area of the VS Code API is also tricky for a couple reasons:
- The [FileSystem](https://github.com/rust-analyzer/rust-analyzer/pull/8951/files#r651570446) API does not list or warn about any exceptions, but [FileSystemProvider](https://github.com/rust-analyzer/rust-analyzer/pull/8951/files#r651570446) (which `FileSystem` is a wrapper of, AFAICT) does.
- At first glance, [Uri.path](https://github.com/rust-analyzer/rust-analyzer/pull/8951/files#r651570446) *looks* like it works for FS operations. It does not, at least, on Windows. You need to use `Uri.fsPath`.
I only use Windows, so I need people on macOS, Linux, and (possibly) NixOS to test this.
Co-authored-by: wxb1ank <wxblank@gmail.com>
Aleksey Kladov [Tue, 15 Jun 2021 20:02:38 +0000 (23:02 +0300)]
internal: switch some tests to minicore
Aleksey Kladov [Tue, 15 Jun 2021 19:59:51 +0000 (22:59 +0300)]
internal: add option to minicore
bors[bot] [Tue, 15 Jun 2021 19:50:34 +0000 (19:50 +0000)]
Merge #9295
9295: fix: Highlight unsafe trait refs as unsafe only in impl blocks and definitions r=Veykril a=Veykril
bors r+
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>