Commit Graph

7772 Commits

Author SHA1 Message Date
bors[bot]
94323c8996
Merge #3136
3136: Not bash r=matklad a=matklad

More declarative installation

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2020-02-14 16:14:25 +00:00
Aleksey Kladov
f2e8dfc820 Cleanup 2020-02-14 17:11:19 +01:00
Aleksey Kladov
269e2f22a9 More declarative fs massaging 2020-02-14 17:05:56 +01:00
Aleksey Kladov
ce29497e43 Replace Cmd with not-bash 2020-02-14 16:47:09 +01:00
Aleksey Kladov
bd3a41cc33 Prevent auto-update of dev extension 2020-02-14 15:29:19 +01:00
Aleksey Kladov
52dcf3243e Minor 2020-02-14 15:10:49 +01:00
Florian Diebold
5028b86cb8 Move hir_fmt code to display module 2020-02-14 15:01:42 +01:00
bors[bot]
d46b555e31
Merge #3132
3132: Rename Ty::Param => Ty::Placeholder r=matklad a=flodiebold

This aligns more with Chalk.

Co-authored-by: Florian Diebold <florian.diebold@freiheit.com>
2020-02-14 13:48:45 +00:00
Florian Diebold
a324d066cb Rename Ty::Param => Ty::Placeholder
This aligns more with Chalk.
2020-02-14 14:44:00 +01:00
Kevin DeLorey
be97cbfdb4 Adjusted the completion lookups to filter by just the name. 2020-02-13 19:10:08 -06:00
bors[bot]
a19f52f9ae
Merge #3116
3116: vscode: added error handling to download file streams r=matklad a=Veetaha

As a followup for #3092 
`ts-nested-error` is mine, it is just [one file worth nothing](https://github.com/Veetaha/ts-nested-error/blob/master/src/nested-error.ts), but let's us inspect original errors


Co-authored-by: Veetaha <gerzoh1@gmail.com>
2020-02-13 22:41:37 +00:00
Veetaha
574dc11a2f vscode: removed nested errors as per matklad 2020-02-14 00:33:12 +02:00
Veetaha
fd37151ade vscode: reordered config constructor before methods 2020-02-13 23:05:32 +02:00
Veetaha
7ad15c3962 vscode: redesigned config with simplicity and Dart extension config implementation in mind 2020-02-13 22:48:20 +02:00
Veetaha
9b47124e6e vscode: added more type safety to package.json config 2020-02-13 22:47:31 +02:00
Veetaha
da6ae3b6e0 vscode: replaced DownloadFileError with NestedError itself for simplicity 2020-02-13 22:21:19 +02:00
bors[bot]
1f897d1c6e
Merge #3120
3120: Support trait auto import r=matklad a=SomeoneToIgnore

Unfortunately, for real cases it does not work as spectacular as in the tests.

The main reason for that is type inference:
* The callee type [here](https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ra_hir_ty/src/method_resolution.rs#L369) is unknown for many cases
* The trait solution [here](https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ra_hir_ty/src/method_resolution.rs#L399) is also often ambiguous

That results in trait candidates being rejected, and some real cases not supported.
Example: no imports for `String::from_str("test")`

Co-authored-by: Kirill Bulatov <mail4score@gmail.com>
2020-02-13 11:37:32 +00:00
Adam Bratschi-Kaye
6f2cab1368
Add error context to failures in ra_project_model using anyhow crate (#3119)
Add error context to failures in ra_project_model using anyhow crate
2020-02-13 11:10:50 +01:00
bors[bot]
39abac8c91
Merge #3126
3126: prevent "Play" symbol in "Run Test" code lens from rendering as emoji r=matklad a=quanlou

for #3091 

Co-authored-by: Quan Luu <manhquan110@gmail.com>
2020-02-13 10:01:53 +00:00
Quan Luu
409c1a7f06 prevent "Play" symbol in "Run Test" code lens from rendering as emoji 2020-02-13 15:09:39 +07:00
Kevin DeLorey
0bc9e62374 Completion now replaces whole fn/const/type def with snippet. 2020-02-12 21:00:47 -06:00
Kevin DeLorey
43e62a87ab Cheese const tests as they requre an ident before becoming a CONST_DEF. 2020-02-12 20:46:55 -06:00
Kevin DeLorey
877cfbacf9 Started to refactor the trigger of the trait_impl completion. 2020-02-12 20:21:43 -06:00
bors[bot]
5e464d058b
Merge #3127
3127: Support unnamed arguments in function pointers r=edwin0cheng a=hanmertens

Fixes #3089

Co-authored-by: Han Mertens <hanmertens@outlook.com>
2020-02-12 22:26:35 +00:00
Han Mertens
bed9c083de Run cargo test 2020-02-12 23:15:48 +01:00
Han Mertens
537da096fe Run cargo xtask codegen 2020-02-12 23:09:13 +01:00
Han Mertens
b435fe8b77 Add test for unnamed argument in function pointer 2020-02-12 22:55:37 +01:00
Kirill Bulatov
e4f4cd77a0 Do not collect all traits 2020-02-12 23:27:19 +02:00
Han Mertens
0e10e77a78 Support unnamed arguments in function pointers
Fixes #3089
2020-02-12 21:40:05 +01:00
Kirill Bulatov
e008b08054 Support associated consts 2020-02-12 22:38:19 +02:00
Veetaha
a3febc1c57 vscode: switched to stream.pipeline with .on(close) workaround 2020-02-12 21:40:35 +02:00
bors[bot]
3da53ab3e7
Merge #3125
3125: Add couple of utility methods r=matklad a=matklad



Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2020-02-12 17:20:27 +00:00
Aleksey Kladov
f2424f947c Add couple of utility methods 2020-02-12 18:19:55 +01:00
bors[bot]
9701e59783
Merge #3124
3124: Simplify r=matklad a=matklad



Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2020-02-12 17:02:41 +00:00
Aleksey Kladov
6ec982d54d Simplify 2020-02-12 18:02:00 +01:00
Kirill Bulatov
3ccf8b746a Also consider associated constants 2020-02-12 18:52:29 +02:00
Kirill Bulatov
f65daf23df Revert source_analyzer changes 2020-02-12 17:34:37 +02:00
Kirill Bulatov
afc1d18ff3 Fix post-rebase issues 2020-02-12 17:18:42 +02:00
Kirill Bulatov
acf5f43639 Refactor the code 2020-02-12 17:18:42 +02:00
Kirill Bulatov
07058cbf9f Adjust the assist group name 2020-02-12 17:18:42 +02:00
Kirill Bulatov
24f7028d3f Add profiling 2020-02-12 17:18:42 +02:00
Kirill Bulatov
d5c3808545 Support trait method call autoimports 2020-02-12 17:18:42 +02:00
Kirill Bulatov
8f959f20ee Trait location draft 2020-02-12 17:18:42 +02:00
Kirill Bulatov
9b6db7bbd4 Refactor path for imports extraction 2020-02-12 17:18:42 +02:00
Kirill Bulatov
2b9b16cb45 Add method tests 2020-02-12 17:18:41 +02:00
Kirill Bulatov
24ab3e80ca Resolve methods and functions better 2020-02-12 17:18:41 +02:00
bors[bot]
5bf6698609
Merge #3121
3121: Do not add imports before inner attributes r=matklad a=SomeoneToIgnore

Current `insert_use_statement` function adds imports before inner attributes which results in compiler errors:
<img width="1440" alt="image" src="https://user-images.githubusercontent.com/2690773/74344019-a3749500-4db4-11ea-9d88-f71e903e795a.png">


Co-authored-by: Kirill Bulatov <mail4score@gmail.com>
2020-02-12 15:08:34 +00:00
Kirill Bulatov
2a7d97d829 Fix the trailing whitespace test 2020-02-12 17:04:16 +02:00
bors[bot]
421609225a
Merge #3122
3122: Add more hir APIs for associated items r=SomeoneToIgnore a=matklad



Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2020-02-12 15:00:45 +00:00
Kirill Bulatov
848c576266 Introduce AttrKind 2020-02-12 16:44:52 +02:00