]>
git.lizzy.rs Git - rust.git/log
bors[bot] [Wed, 20 Feb 2019 20:33:40 +0000 (20:33 +0000)]
Merge #863
863: Token source r=matklad a=matklad
Some reshuffling of parser's API with the eye towards extracting parse **without** syntax tree into a separate crate, to be used with macro expansion
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Wed, 20 Feb 2019 20:17:07 +0000 (23:17 +0300)]
move syntax error to parser
Aleksey Kladov [Wed, 20 Feb 2019 20:05:59 +0000 (23:05 +0300)]
simplify
Aleksey Kladov [Wed, 20 Feb 2019 19:58:56 +0000 (22:58 +0300)]
remove TokenPos
Aleksey Kladov [Wed, 20 Feb 2019 19:52:32 +0000 (22:52 +0300)]
flattern module structure
Aleksey Kladov [Wed, 20 Feb 2019 19:44:06 +0000 (22:44 +0300)]
merge parse_impl and parser_api
Aleksey Kladov [Wed, 20 Feb 2019 19:27:49 +0000 (22:27 +0300)]
fix off by one error
Aleksey Kladov [Wed, 20 Feb 2019 19:19:12 +0000 (22:19 +0300)]
move abstract traits to top
Aleksey Kladov [Wed, 20 Feb 2019 19:02:03 +0000 (22:02 +0300)]
switch to dynamic dispatch for TokenSource
Benchmarks show no difference. This is probably because we are
bottlenecked on memory allocations, and we should fix that, but we are
not optimizing for performance just yet.
changes. Lines starting # with '#' will be ignored, and an empty
message aborts the commit. # # On branch token-source # Changes to be
committed: # modified: crates/ra_syntax/src/parsing/parser_api.rs #
modified: crates/ra_syntax/src/parsing/parser_impl.rs #
Aleksey Kladov [Wed, 20 Feb 2019 18:50:07 +0000 (21:50 +0300)]
route parsing via TokenSource trait
Aleksey Kladov [Wed, 20 Feb 2019 18:08:59 +0000 (21:08 +0300)]
rename Sink -> TreeSink
bors[bot] [Wed, 20 Feb 2019 13:50:29 +0000 (13:50 +0000)]
Merge #861
861: Move parsing to a separate module r=matklad a=matklad
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Wed, 20 Feb 2019 13:48:06 +0000 (16:48 +0300)]
fix tests
Aleksey Kladov [Wed, 20 Feb 2019 13:24:39 +0000 (16:24 +0300)]
rearrange modules in a suggestd reading order
Aleksey Kladov [Wed, 20 Feb 2019 13:16:14 +0000 (16:16 +0300)]
flatten modules
Aleksey Kladov [Wed, 20 Feb 2019 13:02:06 +0000 (16:02 +0300)]
move reparsers to grammar
Aleksey Kladov [Wed, 20 Feb 2019 12:57:26 +0000 (15:57 +0300)]
tighten visibility
Aleksey Kladov [Wed, 20 Feb 2019 12:47:32 +0000 (15:47 +0300)]
move all parsing related bits to a separate module
Aleksey Kladov [Wed, 20 Feb 2019 12:03:31 +0000 (15:03 +0300)]
slightly better name
Aleksey Kladov [Wed, 20 Feb 2019 11:53:19 +0000 (14:53 +0300)]
make stuff private
bors[bot] [Tue, 19 Feb 2019 17:07:26 +0000 (17:07 +0000)]
Merge #859
859: remove ignored macro tests r=matklad a=matklad
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Tue, 19 Feb 2019 16:51:48 +0000 (19:51 +0300)]
remove ignored macro tests
we need to significantly reengineer macros, so the tests as they exist
are useless
bors[bot] [Tue, 19 Feb 2019 09:10:52 +0000 (09:10 +0000)]
Merge #858
858: Use named multiline Problem Matcher r=matklad a=kjeremy
Now that https://github.com/Microsoft/vscode/pull/65840 is in the latest release we can use the first commit from https://github.com/rust-analyzer/rust-analyzer/pull/408
Co-authored-by: kjeremy <kjeremy@gmail.com>
kjeremy [Mon, 18 Feb 2019 18:12:54 +0000 (13:12 -0500)]
Use named multiline Problem Matcher
Now that https://github.com/Microsoft/vscode/pull/65840 is in the latest
release we can use the first commit from https://github.com/rust-analyzer/rust-analyzer/pull/408
bors[bot] [Mon, 18 Feb 2019 13:44:15 +0000 (13:44 +0000)]
Merge #857
857: remove local-vfs r=matklad a=matklad
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Mon, 18 Feb 2019 13:43:30 +0000 (16:43 +0300)]
remove local-vfs
Aleksey Kladov [Mon, 18 Feb 2019 13:43:16 +0000 (16:43 +0300)]
switch to crates.io vfs
bors[bot] [Mon, 18 Feb 2019 13:21:01 +0000 (13:21 +0000)]
Merge #856
856: Reduce dependnecies of ra_vfs r=pnkfelix a=matklad
In preparation for moving `ra_vfs` to a separate repo with extensive cross-platform CI, remove dependency on `ra_thread_workder` and `ra_arena`.
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Mon, 18 Feb 2019 13:20:12 +0000 (16:20 +0300)]
better comments
Aleksey Kladov [Mon, 18 Feb 2019 12:30:58 +0000 (15:30 +0300)]
drop dependency on thread_worker
Aleksey Kladov [Mon, 18 Feb 2019 11:39:18 +0000 (14:39 +0300)]
drop unused extern crate
Aleksey Kladov [Mon, 18 Feb 2019 11:29:54 +0000 (14:29 +0300)]
hide TaskResult from the public API
Aleksey Kladov [Mon, 18 Feb 2019 11:21:25 +0000 (14:21 +0300)]
move public API to top of the file
Aleksey Kladov [Mon, 18 Feb 2019 11:20:54 +0000 (14:20 +0300)]
remove depedency on ra_arena
Aleksey Kladov [Mon, 18 Feb 2019 11:13:13 +0000 (14:13 +0300)]
remove arena from Roots
we want to move ra_vfs to a new repo, so having fewer deps is useful.
Arena is a thin layer of sugar on top of Vec anyway.
Aleksey Kladov [Mon, 18 Feb 2019 11:05:08 +0000 (14:05 +0300)]
remove useless Arc
bors[bot] [Mon, 18 Feb 2019 09:47:31 +0000 (09:47 +0000)]
Merge #855
855: :arrow_up: deps r=matklad a=matklad
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Mon, 18 Feb 2019 09:46:08 +0000 (12:46 +0300)]
drop unused deps
Aleksey Kladov [Mon, 18 Feb 2019 09:36:04 +0000 (12:36 +0300)]
:arrow_up: deps
bors[bot] [Mon, 18 Feb 2019 09:26:24 +0000 (09:26 +0000)]
Merge #854
854: more compact edits in insta r=matklad a=matklad
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Mon, 18 Feb 2019 09:23:31 +0000 (12:23 +0300)]
more compact edits in insta
Aleksey Kladov [Mon, 18 Feb 2019 09:05:16 +0000 (12:05 +0300)]
Don't use additional_text_edits API internally
bors[bot] [Mon, 18 Feb 2019 09:13:51 +0000 (09:13 +0000)]
Merge #852
852: Handle != r=flodiebold a=matklad
r? @flodiebold
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Mon, 18 Feb 2019 09:07:47 +0000 (12:07 +0300)]
More orthogonal method naming
bors[bot] [Mon, 18 Feb 2019 07:32:21 +0000 (07:32 +0000)]
Merge #853
853: More compact debug representation for completion r=matklad a=matklad
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Mon, 18 Feb 2019 07:31:00 +0000 (10:31 +0300)]
More compact debug representation for completion
Aleksey Kladov [Mon, 18 Feb 2019 07:09:44 +0000 (10:09 +0300)]
handle != operator
bors[bot] [Mon, 18 Feb 2019 06:22:07 +0000 (06:22 +0000)]
Merge #850
850: Handle tuple structs / enum variants properly in type inference r=matklad a=flodiebold
Co-authored-by: Florian Diebold <flodiebold@gmail.com>
bors[bot] [Mon, 18 Feb 2019 06:14:39 +0000 (06:14 +0000)]
Merge #851
851: Enable parsing attributes for generic lifetimes and type parameters r=matklad a=vipentti
Co-authored-by: Ville Penttinen <villem.penttinen@gmail.com>
Ville Penttinen [Sun, 17 Feb 2019 20:19:21 +0000 (22:19 +0200)]
Enable parsing attributes for generic lifetimes and type parameters
Florian Diebold [Sun, 17 Feb 2019 16:29:51 +0000 (17:29 +0100)]
Handle tuple structs / enum variants properly in type inference
bors[bot] [Sun, 17 Feb 2019 18:47:09 +0000 (18:47 +0000)]
Merge #849
849: Don't render `()` in calls to assoc functions r=matklad a=matklad
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
bors[bot] [Sun, 17 Feb 2019 18:39:26 +0000 (18:39 +0000)]
Merge #846
846: WIP: Enable parsing of attributes inside a match block r=matklad a=vipentti
We allow invalid inner attributes to be parsed, e.g. inner attributes that are
not directly after the opening brace of the match block.
Instead we run validation on `MatchArmList` to allow better reporting of errors.
This fixes #845 and works towards #759
Co-authored-by: Ville Penttinen <villem.penttinen@gmail.com>
Ville Penttinen [Sun, 17 Feb 2019 18:32:10 +0000 (20:32 +0200)]
Remove match_armlist validator
Aleksey Kladov [Sun, 17 Feb 2019 18:30:46 +0000 (21:30 +0300)]
Don't render `()` in calls to assoc functions
bors[bot] [Sun, 17 Feb 2019 18:19:27 +0000 (18:19 +0000)]
Merge #847
847: Refactor vfs r=matklad a=matklad
Some slight refctorings of VFS, in preparation for moving it to a separate repo
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Sun, 17 Feb 2019 18:10:40 +0000 (21:10 +0300)]
marginally better names
Aleksey Kladov [Sun, 17 Feb 2019 18:05:33 +0000 (21:05 +0300)]
fix-tests
Aleksey Kladov [Sun, 17 Feb 2019 17:58:28 +0000 (20:58 +0300)]
remove overlay removes overlay
Aleksey Kladov [Sun, 17 Feb 2019 17:54:11 +0000 (20:54 +0300)]
simplify overlay handling
Ville Penttinen [Sun, 17 Feb 2019 17:48:08 +0000 (19:48 +0200)]
Parse only outer_attributes for match arms for now
Aleksey Kladov [Sun, 17 Feb 2019 17:34:01 +0000 (20:34 +0300)]
simplify
Ville Penttinen [Sun, 17 Feb 2019 17:08:34 +0000 (19:08 +0200)]
Enable parsing of attributes inside a match block
We allow invalid inner attributes to be parsed, e.g. inner attributes that are
not directly after the opening brace of the match block.
Instead we run validation on `MatchArmList` to allow better reporting of errors.
Aleksey Kladov [Sun, 17 Feb 2019 17:25:52 +0000 (20:25 +0300)]
rename method
Aleksey Kladov [Sun, 17 Feb 2019 17:25:35 +0000 (20:25 +0300)]
remove duplicated method
Aleksey Kladov [Sun, 17 Feb 2019 17:22:46 +0000 (20:22 +0300)]
hide root config
Aleksey Kladov [Sun, 17 Feb 2019 16:46:55 +0000 (19:46 +0300)]
move roots to a module
bors[bot] [Sun, 17 Feb 2019 15:38:33 +0000 (15:38 +0000)]
Merge #844
844: Refactor find_all_refs to return ReferenceSearchResult r=vipentti a=vipentti
This refactors `find_all_refs` to return a new `ReferenceSearchResult` based on feedback in #839.
There are few questions/notes regarding the refactor:
1. Introducing `NavigationTarget::from_bind_pat` this simply forwards the call to `NavigationTarget::from_named`, could we just expose `from_named` directly as `pub(crate)` ?
2. Added an utility method `NavigationTarget::range` since there were few places where you would use `self.focus_range.unwrap_or(self.full_range)`
3. Implementing `IntoIterator` for `ReferenceSearchResult`. This turns `ReferenceSearchResult` into an iterator over `FileRanges` and allows previous code to mostly stay as it was based on the order that `find_all_refs` previously had (declaration first and then the references). I'm not sure if there is a way of doing the conversion to `IntoIter` without the allocation of a new vector
4. Is it possible to have a binding without a name? I'm not sure if the `NavigationTarget::from_bind_pat` can cause some edge-cases that previously were ok
This fixes #835.
Co-authored-by: Ville Penttinen <villem.penttinen@gmail.com>
Ville Penttinen [Sun, 17 Feb 2019 15:25:19 +0000 (17:25 +0200)]
Remove leading ::
bors[bot] [Sun, 17 Feb 2019 13:56:22 +0000 (13:56 +0000)]
Merge #843
843: Impl generics r=matklad a=flodiebold
This handles type parameters on impls when typing method calls.
~One remaining problem is that the autoderefs aren't applied during the unification of the method receiver type with the actual receiver type, which means that the type parameters are only correctly inferred if no autoderefs happened.~
Co-authored-by: Florian Diebold <flodiebold@gmail.com>
Florian Diebold [Sun, 17 Feb 2019 13:54:48 +0000 (14:54 +0100)]
Make GenericArgs::from_ast pub(crate)
Florian Diebold [Sun, 17 Feb 2019 13:43:59 +0000 (14:43 +0100)]
Unify with the autorefed/autoderefed receiver type during method resolution
Ville Penttinen [Sun, 17 Feb 2019 11:38:32 +0000 (13:38 +0200)]
Refactor find_all_refs to return ReferenceSearchResult
Florian Diebold [Sat, 16 Feb 2019 22:05:57 +0000 (23:05 +0100)]
Handle generic args for method calls
Florian Diebold [Sat, 16 Feb 2019 21:06:23 +0000 (22:06 +0100)]
Handle impl generics in method calls
Florian Diebold [Sat, 16 Feb 2019 20:21:36 +0000 (21:21 +0100)]
Resolve impl generic params
Florian Diebold [Sat, 16 Feb 2019 20:19:24 +0000 (21:19 +0100)]
Add generic params to impl blocks
Florian Diebold [Sat, 16 Feb 2019 19:29:36 +0000 (20:29 +0100)]
Add a test for impl generics
bors[bot] [Sat, 16 Feb 2019 21:10:26 +0000 (21:10 +0000)]
Merge #842
842: Turn ImplBlock into a copy type just containing IDs r=matklad a=flodiebold
This makes it more like the other code model types.
Also make Module::definition_source/declaration_source return HirFileIds, to
make them more like the other source functions.
Co-authored-by: Florian Diebold <flodiebold@gmail.com>
Florian Diebold [Sat, 16 Feb 2019 20:09:58 +0000 (21:09 +0100)]
Turn ImplBlock into a copy type just containing IDs
This makes it more like the other code model types.
Also make Module::definition_source/declaration_source return HirFileIds, to
make them more like the other source functions.
bors[bot] [Sat, 16 Feb 2019 17:01:36 +0000 (17:01 +0000)]
Merge #841
841: Add my emacs configuration r=matklad a=flodiebold
I cleaned up and extended my custom emacs code for RA a bit.
This relies on emacs-lsp instead of eglot, so I didn't want to just add it to the other one. It supports some more things, though.
Co-authored-by: Florian Diebold <flodiebold@gmail.com>
Florian Diebold [Sat, 16 Feb 2019 14:24:12 +0000 (15:24 +0100)]
Add my emacs configuration
This relies on emacs-lsp instead of eglot, so I didn't want to just add it to
the other one.
Aleksey Kladov [Sat, 16 Feb 2019 11:43:59 +0000 (14:43 +0300)]
document design guideline
bors[bot] [Sat, 16 Feb 2019 11:29:03 +0000 (11:29 +0000)]
Merge #836
836: auto_import: fix bug when the common path was shorter than both the c… r=matklad a=eulerdisk
Fix bug when the common path was shorter than both the current use and target path.
Wrong 1 (unnecessary self)
```
use std::fmt::nested::Debug;
std::fmt::Display<|>
```
--->
```
use std::fmt::{ self, Display, nested::Debug};
Display<|>
```
Wrong 2 (unnecessary, Debug disappear!!)
```
use std::fmt::Debug;
std::fmt::nested::Display
```
-->
```
use std::fmt::Debug::{ self, nested::Display, };
Display<|>
```
Co-authored-by: Andrea Pretto <eulerdisk@gmail.com>
bors[bot] [Fri, 15 Feb 2019 13:17:09 +0000 (13:17 +0000)]
Merge #838
838: Dont slow down everyone else's testing (especially the CI) just for Mac OS X r=matklad a=pnkfelix
The allowance for up to 7 events, and thus requiring anyone with fewer than 7 events to wait for the 3 second timeout, is only relevant to fsevents (i.e. Mac OS X)
Co-authored-by: Felix S. Klock II <pnkfelix@pnkfx.org>
Felix S. Klock II [Fri, 15 Feb 2019 12:26:19 +0000 (13:26 +0100)]
Dont slow down everyone else's testing (especially the CI's Linux) just for OS X.
Namely, the allowance for up to 7 events, and thus requiring anyone
with fewer than 7 events to wait for the 3 second timeout, is only
relevant to fsevents (i.e. Mac OS X)
bors[bot] [Fri, 15 Feb 2019 12:01:27 +0000 (12:01 +0000)]
Merge #837
837: Generalize vfs.rs test to address fsevents timing-dependent behavior. r=matklad a=pnkfelix
Generalize `tests/vfs.rs` processing to address wildly-varying timing-dependent behavior from fsevents (i.e. on Mac OS X).
Fix #734
Co-authored-by: Felix S. Klock II <pnkfelix@pnkfx.org>
Felix S. Klock II [Fri, 15 Feb 2019 11:45:53 +0000 (12:45 +0100)]
Generalize `tests/vfs.rs` processing to address wildly-varying time-dependent behavior on Mac OS X.
bors[bot] [Thu, 14 Feb 2019 22:00:11 +0000 (22:00 +0000)]
Merge #830
830: Fix test_vfs_works failing on Windows due to extra Write events r=pnkfelix a=vipentti
On Windows `notify` generates extra `Write` events for folders, which caused
`process_tasks` to not handle all tasks generated on Windows.
This fixes #827
Co-authored-by: Ville Penttinen <villem.penttinen@gmail.com>
Andrea Pretto [Thu, 14 Feb 2019 20:33:38 +0000 (21:33 +0100)]
auto_import: fix bug when the common path was shorter than both the current use and target path.
Shorter test names.
bors[bot] [Thu, 14 Feb 2019 18:34:47 +0000 (18:34 +0000)]
Merge #834
834: use better label for &mut ref completion r=matklad a=matklad
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Thu, 14 Feb 2019 18:28:23 +0000 (21:28 +0300)]
use better label for &mut ref completion
bors[bot] [Thu, 14 Feb 2019 18:22:19 +0000 (18:22 +0000)]
Merge #833
833: automatically wait for worker threads r=matklad a=matklad
closes #817
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Thu, 14 Feb 2019 18:14:47 +0000 (21:14 +0300)]
simplify
Aleksey Kladov [Thu, 14 Feb 2019 17:43:45 +0000 (20:43 +0300)]
automatically wait for worker threads
closes #817
bors[bot] [Thu, 14 Feb 2019 17:38:51 +0000 (17:38 +0000)]
Merge #831
831: tweak postfix completions r=matklad a=matklad
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Thu, 14 Feb 2019 17:18:49 +0000 (20:18 +0300)]
tweak postfix completions
* better label
* add refm for &mut
Aleksey Kladov [Thu, 14 Feb 2019 17:13:39 +0000 (20:13 +0300)]
add ref postfix template
Ville Penttinen [Thu, 14 Feb 2019 16:30:21 +0000 (18:30 +0200)]
Fix test_vfs_works failing on Windows due to extra Write events
On Windows `notify` generates extra `Write` events for folders, which caused
`process_tasks` to not handle all tasks generated on Windows.
This fixes #827
bors[bot] [Thu, 14 Feb 2019 16:14:02 +0000 (16:14 +0000)]
Merge #829
829: Be precise about the argument list r=matklad a=kjeremy
Fixes #812
Co-authored-by: Jeremy Kolb <kjeremy@gmail.com>