]>
git.lizzy.rs Git - rust.git/log
bors[bot] [Fri, 20 Dec 2019 12:48:27 +0000 (12:48 +0000)]
Merge #2609
2609: Use generic ItemLoc for impls r=matklad a=matklad
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Fri, 20 Dec 2019 12:47:44 +0000 (13:47 +0100)]
Use generic ItemLoc for impls
Aleksey Kladov [Fri, 20 Dec 2019 12:19:41 +0000 (13:19 +0100)]
Remove more copy-paste
Aleksey Kladov [Fri, 20 Dec 2019 12:11:01 +0000 (13:11 +0100)]
Remove more copy-paste
bors[bot] [Fri, 20 Dec 2019 11:43:19 +0000 (11:43 +0000)]
Merge #2608
2608: Support for nested traits r=matklad a=matklad
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Fri, 20 Dec 2019 11:29:25 +0000 (12:29 +0100)]
Support for nested traits
Aleksey Kladov [Fri, 20 Dec 2019 11:22:55 +0000 (12:22 +0100)]
Support for nested statics, consts and type aliases
Aleksey Kladov [Fri, 20 Dec 2019 11:20:49 +0000 (12:20 +0100)]
Support for nested ADT
Aleksey Kladov [Fri, 20 Dec 2019 11:07:23 +0000 (12:07 +0100)]
Introduce `ContainerId`
Aleksey Kladov [Fri, 20 Dec 2019 10:59:50 +0000 (11:59 +0100)]
Rename ContainerId -> AssocContainerId
bors[bot] [Fri, 20 Dec 2019 10:56:59 +0000 (10:56 +0000)]
Merge #2607
2607: More ground work for local defs r=matklad a=matklad
bors r+
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Fri, 20 Dec 2019 10:30:22 +0000 (11:30 +0100)]
Rebuild ra_lsp_server and nest helper function.
Completion now works again, so there's no need not to nest
Aleksey Kladov [Fri, 20 Dec 2019 10:24:23 +0000 (11:24 +0100)]
Handle nested declrations in from_source
Aleksey Kladov [Fri, 20 Dec 2019 10:19:09 +0000 (11:19 +0100)]
Add local functions to bodies
bors[bot] [Thu, 19 Dec 2019 17:32:51 +0000 (17:32 +0000)]
Merge #2601
2601: :arrow_up: deps r=matklad a=matklad
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Thu, 19 Dec 2019 17:28:57 +0000 (18:28 +0100)]
:arrow_up: deps
Aleksey Kladov [Thu, 19 Dec 2019 17:27:44 +0000 (18:27 +0100)]
:arrow_up: Rust
bors[bot] [Thu, 19 Dec 2019 17:22:40 +0000 (17:22 +0000)]
Merge #2600
2600: Plumbing for local items support r=matklad a=matklad
bors r+
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Thu, 19 Dec 2019 17:21:26 +0000 (18:21 +0100)]
Implement ChildBySource for DefWithBody
Aleksey Kladov [Thu, 19 Dec 2019 17:12:46 +0000 (18:12 +0100)]
Add body as a possible container for items
Aleksey Kladov [Thu, 19 Dec 2019 16:30:28 +0000 (17:30 +0100)]
Allow storing defs in bodies
bors[bot] [Thu, 19 Dec 2019 17:08:12 +0000 (17:08 +0000)]
Merge #2599
2599: Drop dead code r=matklad a=matklad
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Thu, 19 Dec 2019 17:07:39 +0000 (18:07 +0100)]
Drop dead code
bors[bot] [Thu, 19 Dec 2019 16:15:19 +0000 (16:15 +0000)]
Merge #2598
2598: Touch up TokenSet a bit r=matklad a=matklad
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Thu, 19 Dec 2019 16:13:08 +0000 (17:13 +0100)]
Touch up TokenSet a bit
bors[bot] [Thu, 19 Dec 2019 16:04:24 +0000 (16:04 +0000)]
Merge #2597
2597: Handle start imports in import groups r=matklad a=matklad
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Thu, 19 Dec 2019 15:57:22 +0000 (16:57 +0100)]
Handle start imports in import groups
bors[bot] [Thu, 19 Dec 2019 15:35:42 +0000 (15:35 +0000)]
Merge #2594
2594: Omit default parameter types r=matklad a=SomeoneToIgnore
Part of https://github.com/rust-analyzer/rust-analyzer/issues/1946
Co-authored-by: Kirill Bulatov <mail4score@gmail.com>
bors[bot] [Thu, 19 Dec 2019 15:27:45 +0000 (15:27 +0000)]
Merge #2596
2596: Refactor macro tests r=matklad a=matklad
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Thu, 19 Dec 2019 15:17:22 +0000 (16:17 +0100)]
Refactor macro tests
Kirill Bulatov [Thu, 19 Dec 2019 15:11:07 +0000 (17:11 +0200)]
Remove the setting change reminder
Kirill Bulatov [Thu, 19 Dec 2019 14:47:09 +0000 (16:47 +0200)]
Omit default types for hover pop-ups
Kirill Bulatov [Thu, 19 Dec 2019 14:43:41 +0000 (16:43 +0200)]
Remove TruncateOptions struct
Kirill Bulatov [Thu, 19 Dec 2019 14:18:09 +0000 (16:18 +0200)]
Do not add any new configuration parameters
bors[bot] [Thu, 19 Dec 2019 13:45:10 +0000 (13:45 +0000)]
Merge #2595
2595: Fix parsing of interpolated expressions r=matklad a=matklad
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Thu, 19 Dec 2019 13:43:19 +0000 (14:43 +0100)]
Fix parsing of interpolated expressions
Kirill Bulatov [Thu, 19 Dec 2019 10:45:00 +0000 (12:45 +0200)]
Ensure hover shows full type declaration
Kirill Bulatov [Sat, 7 Dec 2019 22:54:18 +0000 (00:54 +0200)]
Omit default parameter types
bors[bot] [Wed, 18 Dec 2019 16:54:28 +0000 (16:54 +0000)]
Merge #2589 #2591
2589: Touch up docs r=matklad a=matklad
2591: Remove dead code r=matklad a=matklad
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Wed, 18 Dec 2019 16:52:52 +0000 (17:52 +0100)]
Remove dead code
bors[bot] [Wed, 18 Dec 2019 16:44:35 +0000 (16:44 +0000)]
Merge #2311
2311: See through Macros for SignatureHelp r=matklad a=kjeremy
Note: we meed to skip the trivia filter to make sure that
`covers!(call_info_bad_offset)` succeeds otherwise we exit call_info
too early.
Also the test doesn't pass: `FnCallNode::with_node` always detects
a MacroCall which is obviously wrong.
Fixes #2310
Co-authored-by: kjeremy <kjeremy@gmail.com>
Co-authored-by: Jeremy Kolb <kjeremy@gmail.com>
Aleksey Kladov [Wed, 18 Dec 2019 16:42:49 +0000 (17:42 +0100)]
Touch up docs
Aleksey Kladov [Wed, 18 Dec 2019 16:41:33 +0000 (17:41 +0100)]
Forbid <T>::foo syntax in mod paths
Aleksey Kladov [Wed, 18 Dec 2019 16:06:52 +0000 (17:06 +0100)]
Move PathKindUp
Aleksey Kladov [Wed, 18 Dec 2019 16:04:20 +0000 (17:04 +0100)]
Touch up docs
bors[bot] [Wed, 18 Dec 2019 15:47:58 +0000 (15:47 +0000)]
Merge #2588
2588: Don't bother with focus range for navigation to locals r=matklad a=matklad
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Wed, 18 Dec 2019 15:25:15 +0000 (16:25 +0100)]
Don't bother with focus range for navigation to locals
bors[bot] [Wed, 18 Dec 2019 15:04:08 +0000 (15:04 +0000)]
Merge #2587
2587: Refactor goto tests to always specify texts r=matklad a=matklad
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Wed, 18 Dec 2019 14:33:36 +0000 (15:33 +0100)]
Refactor goto tests to always specify texts
Aleksey Kladov [Wed, 18 Dec 2019 13:52:58 +0000 (14:52 +0100)]
Add blank lines for readability
bors[bot] [Wed, 18 Dec 2019 14:47:04 +0000 (14:47 +0000)]
Merge #2586
2586: Make reformat hook actually reformat files r=matklad a=matklad
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Wed, 18 Dec 2019 14:40:48 +0000 (15:40 +0100)]
Make reformat hook actually reformat files
Jeremy Kolb [Wed, 18 Dec 2019 14:11:47 +0000 (09:11 -0500)]
cargo fmt
Jeremy Kolb [Wed, 18 Dec 2019 13:58:48 +0000 (08:58 -0500)]
Pass test
bors[bot] [Wed, 18 Dec 2019 13:56:36 +0000 (13:56 +0000)]
Merge #2585
2585: Cleanup Vim and NeoVim instructions. Fix #2579 r=oblitum a=oblitum
I took some freedom to remove additional tips that I simply considered unnecessary as I view it as responsibility of plugin's own docs.
Co-authored-by: Francisco Lopes <francisco@oblita.com>
kjeremy [Mon, 18 Nov 2019 23:08:39 +0000 (18:08 -0500)]
WIP: See through Macros for SignatureHelp
Note: we meed to skip the trivia filter to make sure that
`covers!(call_info_bad_offset)` succeeds otherwise we exit call_info
too early.
Also the test doesn't pass: `FnCallNode::with_node` always detects
a MacroCall.
bors[bot] [Wed, 18 Dec 2019 11:47:50 +0000 (11:47 +0000)]
Merge #2545
2545: Add Token id to all tt::TokenTree r=matklad a=edwin0cheng
This PR try to add token id to all `tt::Leaf` and `tt::Delimiter`.
~~Some tests are failed now because of #2544~~
~~Still blocked by a test in goto-definition : see https://github.com/rust-analyzer/rust-analyzer/pull/2544#issuecomment-
565572553 ~~
Co-authored-by: Edwin Cheng <edwin0cheng@gmail.com>
Edwin Cheng [Wed, 18 Dec 2019 03:47:26 +0000 (11:47 +0800)]
Refactoring
Edwin Cheng [Wed, 18 Dec 2019 03:36:10 +0000 (11:36 +0800)]
Rename range to by_kind
Edwin Cheng [Fri, 13 Dec 2019 19:39:15 +0000 (03:39 +0800)]
Add test for token map
Edwin Cheng [Fri, 13 Dec 2019 19:37:04 +0000 (03:37 +0800)]
Fix shift id for delim and other tokens
Edwin Cheng [Fri, 13 Dec 2019 15:55:51 +0000 (23:55 +0800)]
Add TokenTextRange
Edwin Cheng [Thu, 12 Dec 2019 17:41:44 +0000 (01:41 +0800)]
Add token id to delims
Edwin Cheng [Thu, 12 Dec 2019 13:47:54 +0000 (21:47 +0800)]
Add token ids for all tt::Leaf
bors[bot] [Wed, 18 Dec 2019 03:03:51 +0000 (03:03 +0000)]
Merge #2575
2575: [VS Code Extension] Remap error location if it extracted inside macros r=edwin0cheng a=edwin0cheng
It should fix for #2569
Co-authored-by: Edwin Cheng <edwin0cheng@gmail.com>
Edwin Cheng [Tue, 17 Dec 2019 13:43:19 +0000 (21:43 +0800)]
Use substr instead of endswith
Edwin Cheng [Tue, 17 Dec 2019 05:50:08 +0000 (13:50 +0800)]
Add tests
Edwin Cheng [Tue, 17 Dec 2019 05:50:00 +0000 (13:50 +0800)]
Add macro span handling
Francisco Lopes [Tue, 17 Dec 2019 23:47:20 +0000 (20:47 -0300)]
Cleanup Vim and NeoVim instructions. Fix #2579
bors[bot] [Tue, 17 Dec 2019 21:12:18 +0000 (21:12 +0000)]
Merge #2583
2583: Use prettier settings in ts-lint r=matklad a=edwin0cheng
This PR add `tslint-plugin-prettier` extension in ts-lint, which "runs prettier rules as tslint rules." and remove `quotemark` from ts-lint and let prettier to handle it.
And also fix #2515
Co-authored-by: Edwin Cheng <edwin0cheng@gmail.com>
Edwin Cheng [Tue, 17 Dec 2019 15:48:26 +0000 (23:48 +0800)]
use pretter settings in ts-lint
bors[bot] [Tue, 17 Dec 2019 15:03:38 +0000 (15:03 +0000)]
Merge #2582
2582: Drop dead code r=matklad a=matklad
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Tue, 17 Dec 2019 15:03:15 +0000 (16:03 +0100)]
Drop dead code
bors[bot] [Tue, 17 Dec 2019 14:39:07 +0000 (14:39 +0000)]
Merge #2581
2581: Refactor PathKind r=matklad a=matklad
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Tue, 17 Dec 2019 14:38:28 +0000 (15:38 +0100)]
Refactor PathKind
bors[bot] [Tue, 17 Dec 2019 13:46:12 +0000 (13:46 +0000)]
Merge #2580
2580: Fix highlighting token names r=matklad a=matklad
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Tue, 17 Dec 2019 13:43:37 +0000 (14:43 +0100)]
Fix highlighting token names
bors[bot] [Tue, 17 Dec 2019 13:37:32 +0000 (13:37 +0000)]
Merge #2562
2562: Fix NavigationTarget ranges r=matklad a=edwin0cheng
Fix the issue described in https://github.com/rust-analyzer/rust-analyzer/pull/2544#issuecomment-
565572553
This PR change the order for finding `full_range` of `focus_range` in following orders:
1. map both ranges to macro_call
2. map focus range to a token inside macro call, and full range to the whole of macro call
3. map both ranges to the whole of macro call
And fix the corresponding tests and make these tests easily to follow.
Co-authored-by: Edwin Cheng <edwin0cheng@gmail.com>
bors[bot] [Tue, 17 Dec 2019 13:28:37 +0000 (13:28 +0000)]
Merge #2568
2568: Add option to disable all-targets. r=matklad a=pftbest
Can be useful in embedded.
Co-authored-by: Vadzim Dambrouski <vadzim.dambrouski@promwad.com>
bors[bot] [Tue, 17 Dec 2019 13:19:59 +0000 (13:19 +0000)]
Merge #2571
2571: Fixed a typo in settings r=matklad a=omerbenamram
@lnicola found a typo in the description for one of the settings introduced in #2559.
Co-authored-by: Omer Ben-Amram <omerbenamram@gmail.com>
bors[bot] [Tue, 17 Dec 2019 11:42:19 +0000 (11:42 +0000)]
Merge #2578
2578: Default to client watching on VS Code r=matklad a=matklad
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Tue, 17 Dec 2019 11:41:44 +0000 (12:41 +0100)]
Default to client watching on VS Code
bors[bot] [Tue, 17 Dec 2019 11:12:50 +0000 (11:12 +0000)]
Merge #2577
2577: Improve recovery for incomplete lambdas r=matklad a=matklad
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Tue, 17 Dec 2019 11:11:01 +0000 (12:11 +0100)]
Improve recovery for incomplete lambdas
bors[bot] [Mon, 16 Dec 2019 17:47:43 +0000 (17:47 +0000)]
Merge #2572
2572: link website r=matklad a=matklad
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Mon, 16 Dec 2019 17:41:03 +0000 (18:41 +0100)]
link website
Omer Ben-Amram [Mon, 16 Dec 2019 15:32:46 +0000 (17:32 +0200)]
Fixed a typo
thanks @lnicola
Vadzim Dambrouski [Mon, 16 Dec 2019 03:31:38 +0000 (09:01 +0530)]
Fix formatting
bors[bot] [Sun, 15 Dec 2019 20:08:12 +0000 (20:08 +0000)]
Merge #2567
2567: Handle impl Trait more correctly r=flodiebold a=flodiebold
When calling a function, argument-position impl Trait is transparent; same for return-position impl Trait when inside the function.
So in these cases, we need to represent that type not by `Ty::Opaque`, but by a type variable that can be unified with whatever flows into there.
Co-authored-by: Florian Diebold <flodiebold@gmail.com>
Florian Diebold [Sun, 15 Dec 2019 20:06:08 +0000 (21:06 +0100)]
Add test mark
Vadzim Dambrouski [Sun, 15 Dec 2019 17:32:13 +0000 (23:02 +0530)]
Add option to disable all-targets.
Can be useful in embedded.
Florian Diebold [Sun, 15 Dec 2019 17:56:38 +0000 (18:56 +0100)]
Handle impl Trait more correctly
When calling a function, argument-position impl Trait is transparent; same for
return-position impl Trait when inside the function. So in these cases, we need
to represent that type not by `Ty::Opaque`, but by a type variable that can be
unified with whatever flows into there.
Florian Diebold [Fri, 6 Dec 2019 11:45:00 +0000 (12:45 +0100)]
Add test for unifying impl Trait
bors[bot] [Sun, 15 Dec 2019 16:35:23 +0000 (16:35 +0000)]
Merge #2565
2565: Fixed syntax highlighting not refreshing on windows. r=matklad a=omerbenamram
I was encoutering the same probelm described in #1690.
It seems that events initiated by the frontend with `rust-analyzer/decorationsRequest` would go through.
So whenever a user switches tabs, highlighting will update.
However, when decorations are initiated by a notification with `rust-analyzer/publishDecorations`, it would fail on this check here https://github.com/rust-analyzer/rust-analyzer/blob/
6cbd8a4a4bbca8a7656df9f3ef849acebbf9ef9b /editors/code/src/notifications/publish_decorations.ts#L15 (`targetEditor` will always be `undefined`).
This is because it's trying to match the uri `rust-analyzer` sends (which uses an uppercase drive letter) to the uri provided at `editor.document.uri.toString()`, which is both escaped (uses `%3a` for `:`), and uses a lowercase letter drive.
Aparrently this was an issue for some other extensions aswell - https://github.com/Microsoft/vscode/issues/68325.
But this is the defined behavior - https://github.com/microsoft/vscode/blob/
c110d84460b3e45842a8fe753562341003595e1d /src/vs/vscode.d.ts#L1304
This fix is only relevant for windows.
I've opted for a server-side fix, since rust will always return uppercase letters for drives, there seems to be no other easy solution than manipulating the Url string before sending it to the frontend.
Closes #1690.
Co-authored-by: Omer Ben-Amram <omerbenamram@gmail.com>
bors[bot] [Sun, 15 Dec 2019 16:20:13 +0000 (16:20 +0000)]
Merge #2566
2566: Add a rudimentary json regex to get at information like `endLine` r=matklad a=oli-obk
Co-authored-by: Oliver Scherer <github35764891676564198441@oli-obk.de>
Oliver Scherer [Sun, 15 Dec 2019 16:19:41 +0000 (17:19 +0100)]
Properly format json
Omer Ben-Amram [Sun, 15 Dec 2019 16:15:24 +0000 (18:15 +0200)]
remove unnecessary turbofish.
Oliver Scherer [Sun, 15 Dec 2019 16:12:52 +0000 (17:12 +0100)]
Add a rudimentary json regex to get at information like `endLine`
Omer Ben-Amram [Sun, 15 Dec 2019 15:54:24 +0000 (17:54 +0200)]
cfg gated tests that only work on windows.
Omer Ben-Amram [Sun, 15 Dec 2019 15:46:00 +0000 (17:46 +0200)]
improved path checking to consider only paths that may contain a windows drive.