]>
git.lizzy.rs Git - rust.git/log
Florian Diebold [Sat, 9 Feb 2019 10:08:24 +0000 (11:08 +0100)]
Remove Vfs from project model
Florian Diebold [Sat, 9 Feb 2019 09:51:06 +0000 (10:51 +0100)]
Remove SmolStr from project model
Florian Diebold [Wed, 6 Feb 2019 21:54:33 +0000 (22:54 +0100)]
Move crate graph generation to ra_project_model
Florian Diebold [Tue, 5 Feb 2019 22:10:49 +0000 (23:10 +0100)]
Extract project model to separate crate
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>
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>
robojumper [Sat, 9 Feb 2019 00:57:08 +0000 (01:57 +0100)]
Improve sorting delegate
robojumper [Fri, 8 Feb 2019 23:47:44 +0000 (00:47 +0100)]
Remove unused import
robojumper [Fri, 8 Feb 2019 23:34:05 +0000 (00:34 +0100)]
Add tests for action target ranges
robojumper [Fri, 8 Feb 2019 21:43:13 +0000 (22:43 +0100)]
Add some assist ranges
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.
Aleksey Kladov [Fri, 8 Feb 2019 11:49:43 +0000 (14:49 +0300)]
reformat the world
Aleksey Kladov [Fri, 8 Feb 2019 11:49:26 +0000 (14:49 +0300)]
enable "small heuristics"
bors[bot] [Fri, 8 Feb 2019 11:37:05 +0000 (11:37 +0000)]
Merge #765
765: Jettison `imp` module r=matklad a=matklad
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Fri, 8 Feb 2019 11:30:21 +0000 (14:30 +0300)]
diagnostics is now a function
Aleksey Kladov [Fri, 8 Feb 2019 11:24:39 +0000 (14:24 +0300)]
move diagnostics to a separate file
Aleksey Kladov [Fri, 8 Feb 2019 11:09:57 +0000 (14:09 +0300)]
move index_resolve to symbol index
Aleksey Kladov [Fri, 8 Feb 2019 11:06:26 +0000 (14:06 +0300)]
move find_references to references
Aleksey Kladov [Fri, 8 Feb 2019 10:55:45 +0000 (13:55 +0300)]
avoid 'ignored' in test output
Aleksey Kladov [Fri, 8 Feb 2019 10:51:22 +0000 (13:51 +0300)]
rename rename to references
Aleksey Kladov [Fri, 8 Feb 2019 10:50:18 +0000 (13:50 +0300)]
move crate for
Aleksey Kladov [Fri, 8 Feb 2019 08:52:18 +0000 (11:52 +0300)]
move changes to a separate file
bors[bot] [Thu, 7 Feb 2019 22:56:14 +0000 (22:56 +0000)]
Merge #760
760: Add new assist to remove dbg!() calls r=matklad a=vipentti
This fixes #758.
Currently we try to maintain the cursor position relative to the statement under
cursor, if the cursor is inside the dbg! macro call.
Meaning:
```rust
let foo = dbg!(some.complex<|>().expression());
```
Should turn into:
```rust
let foo = some.complex<|>().expression();
```
With the cursor staying in place.
Co-authored-by: Ville Penttinen <villem.penttinen@gmail.com>
bors[bot] [Thu, 7 Feb 2019 20:13:17 +0000 (20:13 +0000)]
Merge #761
761: Update npm packages r=matklad a=kjeremy
Co-authored-by: kjeremy <kjeremy@gmail.com>
kjeremy [Thu, 7 Feb 2019 19:55:09 +0000 (14:55 -0500)]
Update npm packages
Ville Penttinen [Thu, 7 Feb 2019 18:42:00 +0000 (20:42 +0200)]
Remove unnecessary dbg! calls
Ville Penttinen [Thu, 7 Feb 2019 18:00:58 +0000 (20:00 +0200)]
Add new assist to remove dbg!() calls
This fixes #758.
Currently we try to maintain the cursor position relative to the statement under
cursor, if the cursor is inside the dbg! macro call.
Meaning:
let foo = dbg!(some.complex<|>().expression());
Should turn into:
let foo = some.complex<|>().expression();
With the cursor staying in place.
bors[bot] [Thu, 7 Feb 2019 12:42:53 +0000 (12:42 +0000)]
Merge #755
755: Add new configuration "enableEnhancedTyping" to control registering of "type" command r=matklad a=vipentti
This further fixes problems when having a VIM extension (at least vscodevim)
enabled, by not calling `overrideCommand('type', commands.onEnter.handle)` when
enableEnhancedTyping is set to `false`.
The problem is dependent on the order in which extensions are activated, if
rust-analyzer is activated before `vscodevim`, rust-analyzer will register the
`type` command, and when `vscodevim` finally attempts to activate, it will fail
to register the command. This causes `vscodevim` to stop working properly.
This setting allows users to disable the registerCommand `type` in
rust-analyzer, allowing `vscodevim` to work. The setting defaults to `true`.
Currently changing the setting requires reloading of the window.
Co-authored-by: Ville Penttinen <villem.penttinen@gmail.com>
Ville Penttinen [Thu, 7 Feb 2019 10:54:41 +0000 (12:54 +0200)]
Run prettier
Ville Penttinen [Thu, 7 Feb 2019 10:37:36 +0000 (12:37 +0200)]
Add new configuration "enableEnhancedTyping" to control registering of "type" command
This further fixes problems when having a VIM extension (at least vscodevim)
enabled, by not calling `overrideCommand('type', commands.onEnter.handle)` when
enableEnhancedTyping is set to `false`.
The problem is dependent on the order in which extensions are activated, if
rust-analyzer is activated before `vscodevim`, rust-analyzer will register the
`type` command, and when `vscodevim` finally attempts to activate, it will fail
to register the command. This causes `vscodevim` to stop working properly.
This setting allows users to disable the registerCommand `type` in
rust-analyzer, allowing `vscodevim` to work. The setting defaults to `true`.
Currently changing the setting requires reloading of the window.
bors[bot] [Wed, 6 Feb 2019 21:11:24 +0000 (21:11 +0000)]
Merge #754
754: Some clippy things r=matklad a=kjeremy
Co-authored-by: kjeremy <kjeremy@gmail.com>
kjeremy [Wed, 6 Feb 2019 20:50:26 +0000 (15:50 -0500)]
Some clippy cleanups
bors[bot] [Wed, 6 Feb 2019 16:18:47 +0000 (16:18 +0000)]
Merge #753
753: assists: compute edit r=matklad a=kjeremy
Fixes #751
Co-authored-by: kjeremy <kjeremy@gmail.com>
kjeremy [Wed, 6 Feb 2019 16:15:18 +0000 (11:15 -0500)]
assists: compute edit
bors[bot] [Wed, 6 Feb 2019 15:07:36 +0000 (15:07 +0000)]
Merge #752
752: cargo update r=kjeremy a=kjeremy
Removes a few crates from the dep chain.
Co-authored-by: kjeremy <kjeremy@gmail.com>
kjeremy [Wed, 6 Feb 2019 15:04:48 +0000 (10:04 -0500)]
cargo update
bors[bot] [Wed, 6 Feb 2019 14:01:07 +0000 (14:01 +0000)]
Merge #750
750: Move assists to a separate crate r=matklad a=matklad
I am slowly coming to conclusion that ide_api_light does not make a lot of sense after all :D
This PR moves assists to a separate crate, so that assists can use database (so, inspect types, do name-resolution, etc)
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Sun, 3 Feb 2019 18:26:35 +0000 (21:26 +0300)]
move assists to a separate crate
bors[bot] [Wed, 6 Feb 2019 12:23:26 +0000 (12:23 +0000)]
Merge #748
748: Fill deprecation for LSP r=kjeremy a=kjeremy
Co-authored-by: kjeremy <kjeremy@gmail.com>
Co-authored-by: Jeremy Kolb <kjeremy@gmail.com>
Jeremy Kolb [Wed, 6 Feb 2019 12:22:16 +0000 (07:22 -0500)]
Remove stray dbg!
kjeremy [Tue, 5 Feb 2019 22:05:46 +0000 (17:05 -0500)]
Fill deprecation for LSP
bors[bot] [Tue, 5 Feb 2019 13:21:42 +0000 (13:21 +0000)]
Merge #746
746: Rename assits to assists r=kjeremy a=kjeremy
Co-authored-by: Jeremy Kolb <kjeremy@gmail.com>
Jeremy Kolb [Tue, 5 Feb 2019 13:13:16 +0000 (08:13 -0500)]
Rename assits to assists
bors[bot] [Tue, 5 Feb 2019 12:16:25 +0000 (12:16 +0000)]
Merge #740
740: Update dependencies r=kjeremy a=kjeremy
Co-authored-by: kjeremy <kjeremy@gmail.com>
Co-authored-by: Jeremy Kolb <kjeremy@gmail.com>
Jeremy Kolb [Tue, 5 Feb 2019 12:15:15 +0000 (07:15 -0500)]
Remove unused imports
bors[bot] [Tue, 5 Feb 2019 07:53:08 +0000 (07:53 +0000)]
Merge #742
742: Extern crate r=matklad a=flodiebold
This implements `extern crate` declarations by lowering them to (absolute) imports, and adds support for absolute paths. It also extracts the extern prelude from the per-module item map, and handles the special case of extern crates in the crate root adding to the extern prelude.
This means we finally resolve `Arc`, so it fixes #523 :smile:
Co-authored-by: Florian Diebold <flodiebold@gmail.com>
bors[bot] [Tue, 5 Feb 2019 07:36:51 +0000 (07:36 +0000)]
Merge #743
743: Move comment r=matklad a=kjeremy
As pointed out in https://github.com/rust-analyzer/rust-analyzer/pull/738/files#r253651450
Co-authored-by: kjeremy <kjeremy@gmail.com>
bors[bot] [Tue, 5 Feb 2019 07:28:31 +0000 (07:28 +0000)]
Merge #744
744: mbe: Ensure repetition separator matches r=matklad a=jrmuizel
Co-authored-by: Jeff Muizelaar <jrmuizel@gmail.com>
Jeff Muizelaar [Tue, 5 Feb 2019 01:18:53 +0000 (20:18 -0500)]
mbe: Ensure repetition separator matches
Florian Diebold [Mon, 4 Feb 2019 22:26:25 +0000 (23:26 +0100)]
Fix ReachedFixedPoint value for unresolved external prelude items
kjeremy [Mon, 4 Feb 2019 21:34:02 +0000 (16:34 -0500)]
Move comment
Florian Diebold [Mon, 4 Feb 2019 21:09:56 +0000 (22:09 +0100)]
Complete extern prelude (again)
Florian Diebold [Mon, 4 Feb 2019 20:42:37 +0000 (21:42 +0100)]
Make it possible to have multiple crate in a mock analysis fixture
Florian Diebold [Sun, 3 Feb 2019 22:23:59 +0000 (23:23 +0100)]
Add alloc to std deps
Florian Diebold [Sun, 3 Feb 2019 22:23:22 +0000 (23:23 +0100)]
Make extern crates in the root module add to the extern prelude
To accomplish this, separate the extern prelude from the per-module item maps.
Florian Diebold [Fri, 1 Feb 2019 23:49:20 +0000 (00:49 +0100)]
Lower extern crates to imports
This is probably not completely correct, but it kind of works.
Florian Diebold [Fri, 1 Feb 2019 23:36:48 +0000 (00:36 +0100)]
Add test for extern crate renames
Florian Diebold [Fri, 1 Feb 2019 23:33:54 +0000 (00:33 +0100)]
Add AST for extern crate
Also change it to parse the crate name as a NAME_REF, not a NAME.
bors[bot] [Mon, 4 Feb 2019 20:28:09 +0000 (20:28 +0000)]
Merge #741
741: Test more Self inference r=flodiebold a=kjeremy
These cases didn't look covered.
Co-authored-by: kjeremy <kjeremy@gmail.com>
kjeremy [Mon, 4 Feb 2019 19:44:06 +0000 (14:44 -0500)]
Test more Self inference
kjeremy [Mon, 4 Feb 2019 19:11:51 +0000 (14:11 -0500)]
Bump insta and proptest to latest
bors[bot] [Mon, 4 Feb 2019 18:05:33 +0000 (18:05 +0000)]
Merge #739
739: Future proof by explicitly matching against None r=DJMcNab a=kjeremy
Co-authored-by: kjeremy <kjeremy@gmail.com>
kjeremy [Mon, 4 Feb 2019 17:55:52 +0000 (12:55 -0500)]
cargo update
kjeremy [Mon, 4 Feb 2019 17:49:29 +0000 (12:49 -0500)]
Future proof by explicitly matching against None
bors[bot] [Mon, 4 Feb 2019 15:42:29 +0000 (15:42 +0000)]
Merge #738
738: Implement lens for impls and support resolving lenses. r=matklad a=kjeremy
Closes #620
Co-authored-by: Jeremy Kolb <kjeremy@gmail.com>
Co-authored-by: kjeremy <kjeremy@gmail.com>
kjeremy [Mon, 4 Feb 2019 15:26:43 +0000 (10:26 -0500)]
Add comment
Jeremy Kolb [Fri, 1 Feb 2019 13:44:23 +0000 (08:44 -0500)]
Implement lens for impls and support resolving lenses.
bors[bot] [Mon, 4 Feb 2019 00:50:48 +0000 (00:50 +0000)]
Merge #736
736: mbe: Add support matching for matching idents r=jrmuizel a=jrmuizel
Factors out a helper and adds support for matching idents.
Co-authored-by: Jeff Muizelaar <jrmuizel@gmail.com>
Jeff Muizelaar [Sun, 3 Feb 2019 20:16:55 +0000 (15:16 -0500)]
mbe: Add support matching for matching idents
Jeff Muizelaar [Sun, 3 Feb 2019 20:06:59 +0000 (15:06 -0500)]
Factor out rules parsing
bors[bot] [Sun, 3 Feb 2019 19:15:56 +0000 (19:15 +0000)]
Merge #735
735: make HirDatabase object-safe r=matklad a=matklad
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Sun, 3 Feb 2019 19:15:31 +0000 (22:15 +0300)]
make HirDatabase object-safe
bors[bot] [Sun, 3 Feb 2019 18:11:06 +0000 (18:11 +0000)]
Merge #733
733: fill match arms r=matklad a=gfreezy
fixed #626
Co-authored-by: gfreezy <gfreezy@gmail.com>
gfreezy [Sun, 3 Feb 2019 16:27:36 +0000 (00:27 +0800)]
fill match arm
bors[bot] [Sun, 3 Feb 2019 15:38:38 +0000 (15:38 +0000)]
Merge #732
732: Add core to STD_DEPS r=matklad a=lnicola
See #731.
Co-authored-by: Laurențiu Nicola <lnicola@users.noreply.github.com>
Laurențiu Nicola [Sun, 3 Feb 2019 15:35:42 +0000 (17:35 +0200)]
Add core to STD_DEPS
See #731.
bors[bot] [Sun, 3 Feb 2019 15:12:07 +0000 (15:12 +0000)]
Merge #730
730: Make sure we match the entire pattern r=matklad a=jrmuizel
Co-authored-by: Jeff Muizelaar <jrmuizel@gmail.com>
Jeff Muizelaar [Sun, 3 Feb 2019 15:06:09 +0000 (10:06 -0500)]
Make sure we match the entire pattern
bors[bot] [Sun, 3 Feb 2019 13:26:37 +0000 (13:26 +0000)]
Merge #728
728: add postfix completion for `dbg!()` with `.dbg` r=matklad a=hdhoang
closes #716
Co-authored-by: Hoàng Đức Hiếu <code@hdhoang.space>
Hoàng Đức Hiếu [Sun, 3 Feb 2019 13:12:57 +0000 (20:12 +0700)]
fold complete_postfix tests into one
bors[bot] [Sun, 3 Feb 2019 07:32:59 +0000 (07:32 +0000)]
Merge #727
727: Fix macro_rules separator parsing. r=matklad a=jrmuizel
macro_rules rules are separated by ';' including an optional ';' at the end
Co-authored-by: Jeff Muizelaar <jrmuizel@gmail.com>
Jeff Muizelaar [Sun, 3 Feb 2019 03:36:26 +0000 (22:36 -0500)]
Fill out test a little more
This factors out an assert_expansion function to make things
more managable.
Jeff Muizelaar [Sat, 2 Feb 2019 17:11:12 +0000 (12:11 -0500)]
Fix macro_rules separator parsing.
macro_rules rules are separated by ';' including an optional ';' at the
end
bors[bot] [Sat, 2 Feb 2019 16:18:57 +0000 (16:18 +0000)]
Merge #726
726: Fix number of extern_inner_attributes r=DJMcNab a=DJMcNab
bors r+
Co-authored-by: DJMcNab <36049421+djmcnab@users.noreply.github.com>
DJMcNab [Sat, 2 Feb 2019 16:18:12 +0000 (16:18 +0000)]
Fix number of extern_inner_attributes
Hoàng Đức Hiếu [Sat, 2 Feb 2019 15:10:18 +0000 (22:10 +0700)]
add postfix completion for `dbg!()` with `.dbg`
bors[bot] [Sat, 2 Feb 2019 08:20:50 +0000 (08:20 +0000)]
Merge #725
725: Implement `use as` r=matklad a=flodiebold
Co-authored-by: Florian Diebold <flodiebold@gmail.com>
Florian Diebold [Fri, 1 Feb 2019 23:23:59 +0000 (00:23 +0100)]
Use aliases in import resolution
Florian Diebold [Fri, 1 Feb 2019 23:18:10 +0000 (00:18 +0100)]
Pass aliases to ImportData
Florian Diebold [Fri, 1 Feb 2019 23:17:48 +0000 (00:17 +0100)]
Add test for `use as`
bors[bot] [Fri, 1 Feb 2019 22:37:59 +0000 (22:37 +0000)]
Merge #693
693: Name resolution refactoring r=matklad a=flodiebold
This is still very WIP, but it's becoming quite big and I want to make sure this isn't going in a completely bad direction :sweat_smile:. I'm not really happy with how the path resolution looks, and I'm not sure `PerNs<Resolution>` is the best return type -- there are 'this cannot happen in the (types/values) namespace' cases everywhere. I also want to unify the `resolver` and `nameres` namespaces once I'm done switching everything to `Resolver`. Also, `Resolver` only has a lifetime because it needs to have a reference to the `ItemMap` during import resolution :confused:
The differences in the completion snapshots are almost completely just ordering (except it completes `Self` as well now), so I changed it to sort the completions before snapshotting.
Co-authored-by: Florian Diebold <flodiebold@gmail.com>
Florian Diebold [Fri, 1 Feb 2019 22:06:57 +0000 (23:06 +0100)]
Some cleanup and additional tests
Florian Diebold [Wed, 30 Jan 2019 21:41:44 +0000 (22:41 +0100)]
Make the Resolution variants tuple variants
Florian Diebold [Sun, 27 Jan 2019 16:23:49 +0000 (17:23 +0100)]
Cleanup
Florian Diebold [Tue, 29 Jan 2019 19:49:31 +0000 (20:49 +0100)]
Use the new Resolver API for goto def
Florian Diebold [Sun, 27 Jan 2019 19:50:57 +0000 (20:50 +0100)]
Use the new Resolver API in completion
Florian Diebold [Sat, 26 Jan 2019 21:52:04 +0000 (22:52 +0100)]
Use new Resolver API in type inference
Florian Diebold [Wed, 23 Jan 2019 22:08:41 +0000 (23:08 +0100)]
Implement methods to build a resolver
Florian Diebold [Sat, 19 Jan 2019 20:23:26 +0000 (21:23 +0100)]
Sketching the resolver API
bors[bot] [Fri, 1 Feb 2019 14:31:23 +0000 (14:31 +0000)]
Merge #718
718: split HirDatabase r=matklad a=csmoe
Closes #706
Co-authored-by: csmoe <csmoe@msn.com>