]> git.lizzy.rs Git - rust.git/log
rust.git
5 years agoMerge #811
bors[bot] [Tue, 12 Feb 2019 19:31:22 +0000 (19:31 +0000)]
Merge #811

811: Filter attributes from the completion details/label r=kjeremy a=lnicola

Before:

![image](https://user-images.githubusercontent.com/308347/52657254-efba9a00-2f00-11e9-952f-901910cfc459.png)

After:

![image](https://user-images.githubusercontent.com/308347/52657278-fb0dc580-2f00-11e9-9267-8aff44c93447.png)

Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
5 years agoFilter attributes from the completion details/label
Laurențiu Nicola [Tue, 12 Feb 2019 17:58:36 +0000 (19:58 +0200)]
Filter attributes from the completion details/label

5 years agoMerge #810
bors[bot] [Tue, 12 Feb 2019 17:57:39 +0000 (17:57 +0000)]
Merge #810

810: make token trees eq r=matklad a=matklad

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
5 years agomake token trees eq
Aleksey Kladov [Tue, 12 Feb 2019 17:57:13 +0000 (20:57 +0300)]
make token trees eq

5 years agoMerge #809
bors[bot] [Tue, 12 Feb 2019 16:11:19 +0000 (16:11 +0000)]
Merge #809

809: what goes bump in the night? r=kjeremy a=kjeremy

Co-authored-by: kjeremy <kjeremy@gmail.com>
5 years agoMerge #808
bors[bot] [Tue, 12 Feb 2019 16:03:47 +0000 (16:03 +0000)]
Merge #808

808: rename yellow -> syntax_node r=matklad a=matklad

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
5 years agowhat goes bump in the night?
kjeremy [Tue, 12 Feb 2019 16:03:28 +0000 (11:03 -0500)]
what goes bump in the night?

5 years agorename yellow -> syntax_node
Aleksey Kladov [Tue, 12 Feb 2019 15:41:57 +0000 (18:41 +0300)]
rename yellow -> syntax_node

why yellow in the first place? Its red + green.

5 years agoMerge #807
bors[bot] [Tue, 12 Feb 2019 15:33:02 +0000 (15:33 +0000)]
Merge #807

807: Specify vscode 1.31 r=matklad a=kjeremy

This is for #796

It doesn't seem to fix the problem if you manually install the extension but it is the "right thing to do".

Co-authored-by: kjeremy <kjeremy@gmail.com>
5 years agoSpecify vscode 1.31
kjeremy [Tue, 12 Feb 2019 15:31:11 +0000 (10:31 -0500)]
Specify vscode 1.31

5 years agomention no compatability gurantee
Aleksey Kladov [Tue, 12 Feb 2019 15:28:39 +0000 (18:28 +0300)]
mention no compatability gurantee

5 years agoupdate readme to point to the WG
Aleksey Kladov [Tue, 12 Feb 2019 14:55:02 +0000 (17:55 +0300)]
update readme to point to the WG

5 years agoMerge #804
bors[bot] [Tue, 12 Feb 2019 14:08:20 +0000 (14:08 +0000)]
Merge #804

804: Fix some typos r=killercup a=killercup

Cherry-picked and updated from my now-closed PR. All credit goes to [Code Spell Checker](https://marketplace.visualstudio.com/items?itemName=streetsidesoftware.code-spell-checker).

Co-authored-by: Pascal Hertleif <killercup@gmail.com>
5 years agoFix some typos
Pascal Hertleif [Mon, 11 Feb 2019 16:18:27 +0000 (17:18 +0100)]
Fix some typos

5 years agoMerge #805
bors[bot] [Tue, 12 Feb 2019 13:06:16 +0000 (13:06 +0000)]
Merge #805

805: don't distinguish Create and Write events in VFS r=pnkfelix a=matklad

r? @pnkfelix

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
5 years agodon't distinguish Create and Write events in VFS
Aleksey Kladov [Tue, 12 Feb 2019 12:45:44 +0000 (15:45 +0300)]
don't distinguish Create and Write events in VFS

5 years agoMerge #801
bors[bot] [Tue, 12 Feb 2019 11:07:21 +0000 (11:07 +0000)]
Merge #801

801: Implement completion for associated items r=matklad a=lnicola

Fixes #747.

r? @matklad

Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
5 years agoImplement completion for associated items
Laurențiu Nicola [Tue, 12 Feb 2019 08:33:23 +0000 (10:33 +0200)]
Implement completion for associated items

5 years agoMerge #802
bors[bot] [Tue, 12 Feb 2019 10:33:17 +0000 (10:33 +0000)]
Merge #802

802: fix obsolete comment r=matklad a=matklad

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
5 years agoreplace clone with copy
Aleksey Kladov [Tue, 12 Feb 2019 10:32:34 +0000 (13:32 +0300)]
replace clone with copy

5 years agofix obsolete comment
Aleksey Kladov [Tue, 12 Feb 2019 10:29:27 +0000 (13:29 +0300)]
fix obsolete comment

5 years agoMerge #794
bors[bot] [Mon, 11 Feb 2019 22:05:39 +0000 (22:05 +0000)]
Merge #794

794: fix regression in self-referential completion r=flodiebold a=matklad

r? @flodiebold

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
5 years agofix regression in self-referential completion
Aleksey Kladov [Mon, 11 Feb 2019 20:40:08 +0000 (23:40 +0300)]
fix regression in self-referential completion

5 years agoMerge #793
bors[bot] [Mon, 11 Feb 2019 19:25:26 +0000 (19:25 +0000)]
Merge #793

793: remove hard-coded query-group macro r=matklad a=matklad

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
5 years agoremove hard-coded query-group macro
Aleksey Kladov [Mon, 11 Feb 2019 19:24:39 +0000 (22:24 +0300)]
remove hard-coded query-group macro

5 years agoMerge #791
bors[bot] [Mon, 11 Feb 2019 18:32:18 +0000 (18:32 +0000)]
Merge #791

791: docs r=matklad a=matklad

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
5 years agodocs
Aleksey Kladov [Mon, 11 Feb 2019 18:31:54 +0000 (21:31 +0300)]
docs

5 years agoassign ids when converting tt
Aleksey Kladov [Mon, 11 Feb 2019 18:12:06 +0000 (21:12 +0300)]
assign ids when converting tt

5 years agoassign ids to tokens
Aleksey Kladov [Mon, 11 Feb 2019 16:28:39 +0000 (19:28 +0300)]
assign ids to tokens

5 years agoMerge #781
bors[bot] [Mon, 11 Feb 2019 17:30:53 +0000 (17:30 +0000)]
Merge #781

781: Refactor to allow for multiple assists  r=matklad a=eulerdisk

This is necessary to allow assist "providers" (which currently are simple free function) to produce multiple assists. I'm not sure this is the best possible refactoring tough.

Co-authored-by: Andrea Pretto <eulerdisk@gmail.com>
5 years agora_assists: assist "providers" can produce multiple assists
Andrea Pretto [Mon, 11 Feb 2019 17:07:21 +0000 (18:07 +0100)]
ra_assists: assist "providers" can produce multiple assists

5 years agoMerge #790
bors[bot] [Mon, 11 Feb 2019 16:24:39 +0000 (16:24 +0000)]
Merge #790

790: make macro-rules eq r=matklad a=matklad

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
5 years agomake macro a NameOwner
Aleksey Kladov [Mon, 11 Feb 2019 16:23:13 +0000 (19:23 +0300)]
make macro a NameOwner

5 years agomake macro-rules eq
Aleksey Kladov [Mon, 11 Feb 2019 16:19:23 +0000 (19:19 +0300)]
make macro-rules eq

5 years agoMerge #789
bors[bot] [Mon, 11 Feb 2019 16:10:34 +0000 (16:10 +0000)]
Merge #789

789: remove useless hash r=matklad a=matklad

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
5 years agotypo
Aleksey Kladov [Mon, 11 Feb 2019 16:07:49 +0000 (19:07 +0300)]
typo

5 years agoremove useless hash
Aleksey Kladov [Mon, 11 Feb 2019 16:05:58 +0000 (19:05 +0300)]
remove useless hash

5 years agoMerge #788
bors[bot] [Mon, 11 Feb 2019 14:45:32 +0000 (14:45 +0000)]
Merge #788

788: remove query_definitions r=matklad a=matklad

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
5 years agoremove query_definitions
Aleksey Kladov [Mon, 11 Feb 2019 14:44:54 +0000 (17:44 +0300)]
remove query_definitions

5 years agoMerge #787
bors[bot] [Mon, 11 Feb 2019 14:30:35 +0000 (14:30 +0000)]
Merge #787

787: rename combine -> or r=matklad a=matklad

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
5 years agorename combine -> or
Aleksey Kladov [Mon, 11 Feb 2019 14:29:20 +0000 (17:29 +0300)]
rename combine -> or

This way we match API of Option

https://doc.rust-lang.org/std/option/enum.Option.html#method.or

5 years agoMerge #785
bors[bot] [Mon, 11 Feb 2019 14:02:59 +0000 (14:02 +0000)]
Merge #785

785: Fix completion of paths r=flodiebold a=matklad

r? @flodiebold

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
5 years agoMerge #786
bors[bot] [Mon, 11 Feb 2019 12:46:58 +0000 (12:46 +0000)]
Merge #786

786: :arrow_up: insta r=matklad a=matklad

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
5 years ago:arrow_up: insta
Aleksey Kladov [Mon, 11 Feb 2019 12:46:35 +0000 (15:46 +0300)]
:arrow_up: insta

5 years agouse extern prelude in Resolver
Aleksey Kladov [Mon, 11 Feb 2019 12:39:26 +0000 (15:39 +0300)]
use extern prelude in Resolver

This fixes two bugs:

- completion for paths works again
- we handle extern prelude shadowing more correctly

5 years agoMerge #784
bors[bot] [Mon, 11 Feb 2019 10:54:27 +0000 (10:54 +0000)]
Merge #784

784: WIP: improve multi-crate fixtures r=matklad a=matklad

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
5 years agoadd graph fixture
Aleksey Kladov [Mon, 11 Feb 2019 10:11:24 +0000 (13:11 +0300)]
add graph fixture

5 years agoHandle SourceRoots automatically in fixtures
Aleksey Kladov [Mon, 11 Feb 2019 09:53:10 +0000 (12:53 +0300)]
Handle SourceRoots automatically in fixtures

5 years agoMerge #783
bors[bot] [Mon, 11 Feb 2019 08:22:39 +0000 (08:22 +0000)]
Merge #783

783: Fix typo in Cargo.toml authors r=matklad a=vipentti

Fixes typo introduced in #782

Co-authored-by: Ville Penttinen <villem.penttinen@gmail.com>
5 years agoFix typo in Cargo.toml authors
Ville Penttinen [Mon, 11 Feb 2019 08:20:04 +0000 (10:20 +0200)]
Fix typo in Cargo.toml authors

Fixes typo introduced in #782

5 years agoMerge #782
bors[bot] [Mon, 11 Feb 2019 07:20:51 +0000 (07:20 +0000)]
Merge #782

782: Update authors field in Cargo.tomls to "rust-analyzer developers" r=matklad a=vipentti

This closes #777

Co-authored-by: Ville Penttinen <villem.penttinen@gmail.com>
5 years agoUpdate authors field in Cargo.tomls to "rust-analyzer developers"
Ville Penttinen [Mon, 11 Feb 2019 06:55:35 +0000 (08:55 +0200)]
Update authors field in Cargo.tomls to "rust-analyzer developers"

This closes #777

5 years agoMerge #780
bors[bot] [Sun, 10 Feb 2019 21:37:57 +0000 (21:37 +0000)]
Merge #780

780: Mention node.js requirement in readme r=DJMcNab a=Matthias247

I tried building rust-analyzer according to the instructions, but it failed with a very non-descriptive error:

> will run: npm ci
> Error: Os { code: 2, kind: NotFound, message: "No such file or directory" }

It took me a while to figure out I had an outdated node version installed, which didn't support `npm ci`. I think mentioning the requirement explicitly might prevent others from running into the same issue.

Co-authored-by: Matthias Einwag <matthias.einwag@live.com>
5 years agoMention node.js requirement in readme
Matthias Einwag [Sun, 10 Feb 2019 21:09:33 +0000 (13:09 -0800)]
Mention node.js requirement in readme

5 years agoMerge #778
bors[bot] [Sun, 10 Feb 2019 20:15:41 +0000 (20:15 +0000)]
Merge #778

778: Glob imports r=matklad a=flodiebold

This implements glob imports, completing #231 :)

Co-authored-by: Florian Diebold <flodiebold@gmail.com>
5 years agoMerge #762
bors[bot] [Sun, 10 Feb 2019 19:00:36 +0000 (19:00 +0000)]
Merge #762

762: "Dumb" auto import assist r=matklad a=eulerdisk

This adds a new assist to "add xxx::yyy to the current file" when the cursor is on a PATH. It manages correctly nested imports,`self` keyword and creates new nested imports if necessary. [See the tests]
It doesn't use name resolution so in that sense is 'dumb', but I have plans to do that. That in the future will be useful to auto import trait names in autocompletion for example.

It can easily be extended to provide multiple actions to select in which scope to import. That's another thing I plan to do.

@matklad I copied some indentation code from `ide_light`, I don't know at the moment if/how you want to refactor that code. This assist was meant to be in `ide_light`.

Co-authored-by: Andrea Pretto <eulerdisk@gmail.com>
5 years agoImplement glob imports within the same crate
Florian Diebold [Sun, 10 Feb 2019 15:19:50 +0000 (16:19 +0100)]
Implement glob imports within the same crate

Fixes #231.

5 years agoImport glob imports from other crates
Florian Diebold [Sun, 10 Feb 2019 14:41:44 +0000 (15:41 +0100)]
Import glob imports from other crates

This is the easy part since we don't have to consider the fixpoint algorithm.

5 years agoImplement glob imports from enums
Florian Diebold [Sun, 10 Feb 2019 14:34:04 +0000 (15:34 +0100)]
Implement glob imports from enums

5 years agoAdd some tests
Florian Diebold [Sun, 10 Feb 2019 14:16:23 +0000 (15:16 +0100)]
Add some tests

5 years agoMerge #774
bors[bot] [Sun, 10 Feb 2019 11:42:42 +0000 (11:42 +0000)]
Merge #774

774: Batch crate & command r=matklad a=flodiebold

This adds a new crate, `ra_batch`, which is intended for scenarios where you're loading a workspace once and then running some analyses using the HIR API. Also, it adds a command to `ra_cli` which uses that to type-check all crates in a workspace and print some statistics:

E.g. in rust-analyzer:
```
> $ time target/release/ra_cli analysis-stats
Database loaded, 21 roots
Crates in this dir: 28
Total modules found: 231
Total declarations: 3694
Total functions: 2408
Total expressions: 47017
Expressions of unknown type: 19826 (42%)
Expressions of partially unknown type: 4482 (9%)
target/release/ra_cli analysis-stats  3,23s user 0,60s system 100% cpu 3,821 total
```

Or in rust-lang/rust:
```
> $ time ../opensource/rust-analyzer/target/release/ra_cli analysis-stats
Database loaded, 77 roots
Crates in this dir: 130
Total modules found: 1820
Total declarations: 35038
Total functions: 25914
Total expressions: 753678
Expressions of unknown type: 337975 (44%)
Expressions of partially unknown type: 92314 (12%)
../opensource/rust-analyzer/target/release/ra_cli analysis-stats  13,45s user 2,08s system 100% cpu 15,477 total
```

~This still needs a test. Type-checking all of rust-analyzer sadly takes almost a minute when compiled in debug mode :sweat_smile: So I'll need to add something simpler (maybe just looking at a few modules).~

Co-authored-by: Florian Diebold <flodiebold@gmail.com>
5 years agoSpell cases explicitly in Ty::walk{_mut}
Florian Diebold [Sun, 10 Feb 2019 11:35:30 +0000 (12:35 +0100)]
Spell cases explicitly in Ty::walk{_mut}

5 years agoClean up a bit
Florian Diebold [Sun, 10 Feb 2019 10:48:59 +0000 (11:48 +0100)]
Clean up a bit

5 years agoAdd a smoke test for ra_batch
Florian Diebold [Sun, 10 Feb 2019 10:44:53 +0000 (11:44 +0100)]
Add a smoke test for ra_batch

5 years agoMerge #776
bors[bot] [Sun, 10 Feb 2019 10:33:35 +0000 (10:33 +0000)]
Merge #776

776: Add support for a seperate output channel for trace messages r=DJMcNab a=DJMcNab

See https://github.com/Microsoft/vscode-languageserver-node/pull/444

I am just working on testing this now, but I think it should work.

Co-authored-by: DJMcNab <36049421+djmcnab@users.noreply.github.com>
5 years agoUpdate dependencies
DJMcNab [Sun, 10 Feb 2019 10:32:45 +0000 (10:32 +0000)]
Update dependencies

5 years agoFix trace and prettier
DJMcNab [Sun, 10 Feb 2019 10:30:16 +0000 (10:30 +0000)]
Fix trace and prettier

5 years agoAdd support for a seperate output channel for trace messages
DJMcNab [Sun, 10 Feb 2019 10:06:33 +0000 (10:06 +0000)]
Add support for a seperate output channel for trace messages

5 years agoAdd an ra_cli command that analyses all crates in the current workspace
Florian Diebold [Sat, 9 Feb 2019 17:27:11 +0000 (18:27 +0100)]
Add an ra_cli command that analyses all crates in the current workspace

... and prints various stats about how many expressions have a type etc.

5 years agoImplement BatchDatabase construction
Florian Diebold [Sat, 9 Feb 2019 12:06:12 +0000 (13:06 +0100)]
Implement BatchDatabase construction

5 years agoAdd new crate
Florian Diebold [Tue, 5 Feb 2019 21:54:17 +0000 (22:54 +0100)]
Add new crate

5 years agoMerge #770
bors[bot] [Sun, 10 Feb 2019 08:16:08 +0000 (08:16 +0000)]
Merge #770

770: Fix introduce var duplicating newlines r=matklad a=vipentti

This fixes #713.

If the block before the statement we want to use introduce var on, had empty
lines these empty lines would also be added between the let-statement and
the current line where the new variable is used.

This fixes that by trimming excess newlines from the start of the indent chunk
and simply adding a single newline (when the chunk had newlines) between the
let-statement and the current statement. If there were no newlines this
matches the previous behaviour.

Co-authored-by: Ville Penttinen <villem.penttinen@gmail.com>
5 years agoMerge #773
bors[bot] [Sun, 10 Feb 2019 08:04:49 +0000 (08:04 +0000)]
Merge #773

773: Crash fixes r=matklad a=flodiebold

This fixes a bunch of crashes found while running type inference on the whole rustc repo :sweat_smile:
 - avoid infinite recursion with ref bind patterns
 - avoid another infinite recursion
 - handle literal patterns, add a new LITERAL_PAT syntax node for this
 - fix an expect that's wrong on some invalid code

Co-authored-by: Florian Diebold <flodiebold@gmail.com>
5 years agoAdd comment and mark
Florian Diebold [Sat, 9 Feb 2019 21:03:01 +0000 (22:03 +0100)]
Add comment and mark

5 years agoFix another crash, and try harder to prevent stack overflows
Florian Diebold [Sat, 9 Feb 2019 20:31:31 +0000 (21:31 +0100)]
Fix another crash, and try harder to prevent stack overflows

5 years agoFix another crash found when analyzing rustc
Florian Diebold [Sat, 9 Feb 2019 19:55:51 +0000 (20:55 +0100)]
Fix another crash found when analyzing rustc

5 years agoFix handling of literal patterns
Florian Diebold [Sat, 9 Feb 2019 18:07:35 +0000 (19:07 +0100)]
Fix handling of literal patterns

Wrap them in a LiteralPat node so they can be distinguished from literal
expressions.

5 years agoFix two crashes found by running inference on all of rustc
Florian Diebold [Sat, 9 Feb 2019 17:24:54 +0000 (18:24 +0100)]
Fix two crashes found by running inference on all of rustc

5 years agoMerge #771
bors[bot] [Sat, 9 Feb 2019 16:51:25 +0000 (16:51 +0000)]
Merge #771

771: update notify with fix for hight cpu usage r=matklad a=vemoo

Should fix the ocasional 100% CPU hangs.

I've tried `yes > test.rs` which would cause it before, and now on my computer it stays below 10%, and stops as soon as I interrupt the command, unlike previously which would stay at 100% for a while.

Co-authored-by: Bernardo <berublan@gmail.com>
5 years agoupdate notify with fix for hight cpu usage
Bernardo [Sat, 9 Feb 2019 16:18:26 +0000 (17:18 +0100)]
update notify with fix for hight cpu usage

5 years agoFix introduce var duplicating newlines
Ville Penttinen [Sat, 9 Feb 2019 11:41:03 +0000 (13:41 +0200)]
Fix introduce var duplicating newlines

This fixes #713.

If the block before the statement we want to use introduce var on, had empty
lines these empty lines would also be added between the let-statement and
the current line where the new variable is used.

This fixes that by trimming excess newlines from the start of the indent chunk
and simply adding a single newline (when the chunk had newlines) between the
let-statement and the current statement. If there were no newlines this
matches the previous behaviour.

5 years agoauto_import: use ra_fmt
Andrea Pretto [Sat, 9 Feb 2019 10:33:30 +0000 (11:33 +0100)]
auto_import: use ra_fmt

5 years agoauto_import: struct variants for ImportAction
Andrea Pretto [Fri, 8 Feb 2019 21:12:49 +0000 (22:12 +0100)]
auto_import: struct variants for ImportAction

5 years agoauto_import: remove PathSegmentsMatch
Andrea Pretto [Fri, 8 Feb 2019 20:30:59 +0000 (21:30 +0100)]
auto_import: remove PathSegmentsMatch

5 years agoauto_import: Removed Empty in favor of Partial(0)
Andrea Pretto [Fri, 8 Feb 2019 20:12:05 +0000 (21:12 +0100)]
auto_import: Removed Empty in favor of Partial(0)
auto_import: Removed unecessary lifetimes

5 years agoauto_import assist
Andrea Pretto [Wed, 6 Feb 2019 14:34:37 +0000 (15:34 +0100)]
auto_import assist

5 years agoMerge #767
bors[bot] [Sat, 9 Feb 2019 10:21:13 +0000 (10:21 +0000)]
Merge #767

767: Extract project model to separate crate r=matklad a=flodiebold

I'm looking into creating a separate crate that would allow getting a HIR db for a project for 'batch' analyses, and this seems to be an obvious first step. We'd probably want to change the error handling to not rely on failure, though, right?

Co-authored-by: Florian Diebold <flodiebold@gmail.com>
5 years agoClean up a bit
Florian Diebold [Sat, 9 Feb 2019 10:15:02 +0000 (11:15 +0100)]
Clean up a bit

5 years agoRemove Vfs from project model
Florian Diebold [Sat, 9 Feb 2019 10:08:24 +0000 (11:08 +0100)]
Remove Vfs from project model

5 years agoRemove SmolStr from project model
Florian Diebold [Sat, 9 Feb 2019 09:51:06 +0000 (10:51 +0100)]
Remove SmolStr from project model

5 years agoMove crate graph generation to ra_project_model
Florian Diebold [Wed, 6 Feb 2019 21:54:33 +0000 (22:54 +0100)]
Move crate graph generation to ra_project_model

5 years agoExtract project model to separate crate
Florian Diebold [Tue, 5 Feb 2019 22:10:49 +0000 (23:10 +0100)]
Extract project model to separate crate

5 years agoMerge #766
bors[bot] [Sat, 9 Feb 2019 09:56:54 +0000 (09:56 +0000)]
Merge #766

766: Formatting code into ra_fmt r=matklad a=eulerdisk

As discussed https://github.com/rust-analyzer/rust-analyzer/pull/762#discussion_r254905885

I did only move the code without other improvements.

Co-authored-by: Andrea Pretto <eulerdisk@gmail.com>
5 years agoMerge #768
bors[bot] [Sat, 9 Feb 2019 08:52:09 +0000 (08:52 +0000)]
Merge #768

768: Sort assists by the range of the affected element r=matklad a=robojumper

Closes #763.

https://github.com/rust-analyzer/rust-analyzer/blob/3be98f2ac93b278828e76eb813bdd8033f647b12/crates/ra_assists/src/lib.rs#L233-L236

This could be made more robust by a) adding a way to identify actions by things other than their label and b) allowing arbitrary actions to appear in the list as long as the tested actions are there in the correct order. Let me know if I should do any of that.

Co-authored-by: robojumper <robojumper@gmail.com>
5 years agoImprove sorting delegate
robojumper [Sat, 9 Feb 2019 00:57:08 +0000 (01:57 +0100)]
Improve sorting delegate

5 years agoRemove unused import
robojumper [Fri, 8 Feb 2019 23:47:44 +0000 (00:47 +0100)]
Remove unused import

5 years agoAdd tests for action target ranges
robojumper [Fri, 8 Feb 2019 23:34:05 +0000 (00:34 +0100)]
Add tests for action target ranges

5 years agoAdd some assist ranges
robojumper [Fri, 8 Feb 2019 21:43:13 +0000 (22:43 +0100)]
Add some assist ranges

5 years agoRefactor formatting code out of ra_ida_api_light into ra_fmt.
Andrea Pretto [Fri, 8 Feb 2019 17:58:27 +0000 (18:58 +0100)]
Refactor formatting code out of ra_ida_api_light into ra_fmt.

5 years agoreformat the world
Aleksey Kladov [Fri, 8 Feb 2019 11:49:43 +0000 (14:49 +0300)]
reformat the world