]>
git.lizzy.rs Git - rust.git/log
bors[bot] [Fri, 20 Dec 2019 19:09:02 +0000 (19:09 +0000)]
Merge #2620
2620: Update packages r=matklad a=kjeremy
Co-authored-by: kjeremy <kjeremy@gmail.com>
kjeremy [Fri, 20 Dec 2019 18:52:34 +0000 (13:52 -0500)]
Protect against null as revealed by `npm test`
kjeremy [Fri, 20 Dec 2019 18:52:11 +0000 (13:52 -0500)]
Update to latest packages
bors[bot] [Fri, 20 Dec 2019 18:16:16 +0000 (18:16 +0000)]
Merge #2617
2617: Remove index resolving from hover r=matklad a=kjeremy
I have left in `HoverResult`'s support for multiple entries because we may still want that at some point.
Per https://github.com/rust-analyzer/rust-analyzer/issues/2542#issuecomment-
565238142
Co-authored-by: kjeremy <kjeremy@gmail.com>
bors[bot] [Fri, 20 Dec 2019 17:58:59 +0000 (17:58 +0000)]
Merge #2619
2619: Coerce closures to fn pointers r=flodiebold a=flodiebold
E.g. `let x: fn(A) -> B = |x| { y };`
Co-authored-by: Florian Diebold <florian.diebold@freiheit.com>
Florian Diebold [Fri, 20 Dec 2019 17:53:40 +0000 (18:53 +0100)]
Coerce closures to fn pointers
E.g. `let x: fn(A) -> B = |x| { y };`
bors[bot] [Fri, 20 Dec 2019 17:29:11 +0000 (17:29 +0000)]
Merge #2618
2618: Fix coercion of last expression in function body r=flodiebold a=flodiebold
Co-authored-by: Florian Diebold <florian.diebold@freiheit.com>
Florian Diebold [Fri, 20 Dec 2019 17:27:51 +0000 (18:27 +0100)]
Fix coercion of last expression in function body
bors[bot] [Fri, 20 Dec 2019 17:18:52 +0000 (17:18 +0000)]
Merge #2616
2616: Handle closure return types r=flodiebold a=flodiebold
Fixes #2547.
Co-authored-by: Florian Diebold <florian.diebold@freiheit.com>
Florian Diebold [Fri, 20 Dec 2019 15:41:32 +0000 (16:41 +0100)]
Handle closure return types
Fixes #2547.
kjeremy [Fri, 20 Dec 2019 16:18:24 +0000 (11:18 -0500)]
Remove unused imports
kjeremy [Fri, 20 Dec 2019 16:12:31 +0000 (11:12 -0500)]
Remove the index resolution from hover
We are reasonably precise now to do this.
bors[bot] [Fri, 20 Dec 2019 15:30:36 +0000 (15:30 +0000)]
Merge #2615
2615: Fix wrong path parsing for macro call in pattern position r=edwin0cheng a=edwin0cheng
The parser incorrectly insert a `PathPat` inside `MacroCall` syntax node when parsing inside a pattern position, for example :
```rust
let foo!() = 0;
```
become:
```
MACRO_CALL@[60; 66)
PATH_PAT@[60; 63) <------------- It should not exist
PATH@[60; 63)
PATH_SEGMENT@[60; 63)
NAME_REF@[60; 63)
IDENT@[60; 63) "foo"
EXCL@[63; 64) "!"
TOKEN_TREE@[64; 66)
L_PAREN@[64; 65) "("
R_PAREN@[65; 66) ")"
```
This PR fix this bug and add some test to make sure goto-defintion works for macro inside pattern.
Co-authored-by: Edwin Cheng <edwin0cheng@gmail.com>
Edwin Cheng [Fri, 20 Dec 2019 15:11:07 +0000 (23:11 +0800)]
Fix parser for macro call in pattern position
bors[bot] [Fri, 20 Dec 2019 14:46:24 +0000 (14:46 +0000)]
Merge #2614
2614: Clippy cleanup r=matklad a=kjeremy
Just a few tweaks from the latest clippy. There are a lot more but we should probably tweak our settings.
Co-authored-by: kjeremy <kjeremy@gmail.com>
kjeremy [Fri, 20 Dec 2019 14:43:30 +0000 (09:43 -0500)]
Use unwrap_or_default
kjeremy [Fri, 20 Dec 2019 14:43:01 +0000 (09:43 -0500)]
Remove useless clone
bors[bot] [Fri, 20 Dec 2019 14:36:53 +0000 (14:36 +0000)]
Merge #2592
2592: Add std::ops::Index support for infering r=edwin0cheng a=edwin0cheng
see also #2534
Seem like this can't fix #2534 for this case:
```rust
fn foo3(bar: [usize; 2]) {
let baz = bar[1]; // <--- baz is still unknown ?
println!("{}", baz);
}
```
Co-authored-by: Edwin Cheng <edwin0cheng@gmail.com>
bors[bot] [Fri, 20 Dec 2019 14:28:41 +0000 (14:28 +0000)]
Merge #2613
2613: Remove code that never was alive? r=matklad a=matklad
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Fri, 20 Dec 2019 14:26:19 +0000 (15:26 +0100)]
Remove code that never was alive?
bors[bot] [Fri, 20 Dec 2019 13:50:44 +0000 (13:50 +0000)]
Merge #2612
2612: Fix resolve for field init shorthand r=matklad a=matklad
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Fri, 20 Dec 2019 13:47:01 +0000 (14:47 +0100)]
Fix resolve for field init shorthand
bors[bot] [Fri, 20 Dec 2019 13:12:39 +0000 (13:12 +0000)]
Merge #2611
2611: Fix highlighting for field init shorthand r=matklad a=matklad
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Fri, 20 Dec 2019 13:11:49 +0000 (14:11 +0100)]
Fix highlighting for field init shorthand
Aleksey Kladov [Fri, 20 Dec 2019 13:10:31 +0000 (14:10 +0100)]
Improve highlighting test
bors[bot] [Fri, 20 Dec 2019 12:58:55 +0000 (12:58 +0000)]
Merge #2610
2610: Reduce copy-paste some more r=matklad a=matklad
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Fri, 20 Dec 2019 12:58:09 +0000 (13:58 +0100)]
Reduce copy-paste some more
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
Edwin Cheng [Thu, 19 Dec 2019 19:04:55 +0000 (03:04 +0800)]
Use fill instread of for loop
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
Edwin Cheng [Thu, 19 Dec 2019 14:28:52 +0000 (22:28 +0800)]
Use build_for_def
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
Edwin Cheng [Thu, 19 Dec 2019 04:45:07 +0000 (12:45 +0800)]
Add std::ops::Index support for infering
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>