Commit Graph

5090 Commits

Author SHA1 Message Date
Sergey Parilin
cc2212f3cb added some docs to public functions 2019-04-03 16:05:55 +03:00
bors[bot]
c6c88070c4 Merge #1068
1068: profiling crate first draft r=matklad a=pasa

I've made this first draft for #961 
Could you look at it? Is this something what you are looking for?
It has lack of tests. I can't figure out how to test stderr output in rust right now. Do you have some clues?
Additionally I'm thinking about to implement procedural  macros to annotate methods with this profiler. Will it be helpful?



Co-authored-by: Sergey Parilin <sergey.parilin@fxdd.com>
2019-04-03 09:09:11 +00:00
bors[bot]
b8e58d4a2f Merge #1097
1097: Fix VSCode cargo-watch functionality on Linux. r=matklad a=kiljacken

As of #1079 the VSCode cargo-watch functionality has been broken on
Linux systems.

The cause seems to be that linux takes the added quotes inside process
arguments literally, so it attempts to make cargo-watch run the command
`cargo "check --message-format json"` with the entire quoted part being
treated as a single long subcommand, which cargo doesn't know how to
handle.

Removing the extra quotes solves the issue.

Closes #1096 

Co-authored-by: Emil Lauridsen <mine809@gmail.com>
2019-04-03 09:02:24 +00:00
Emil Lauridsen
b8ea91ae2d Fix eslint errors 2019-04-03 11:01:34 +02:00
Emil Lauridsen
3a79490187 Add extra double quotes only on Windows.
As tested by @edwin0cheng, Windows requires the quotes removed in the
previous commit. This commit re-adds the quotes gated by an if statement
on the node environment, so that quotes are only added on Windows.
2019-04-03 10:38:18 +02:00
Emil Lauridsen
4d78c85de2 Fix VSCode cargo-watch functionality on Linux.
As of #1079 the VSCode cargo-watch functionality has been broken on
Linux systems.

The cause seems to be that linux takes the added quotes inside process
arguments literally, so it attempts to make cargo-watch run the command
`cargo "check --message-format json"` with the entire quoted part being
treated as a single long subcommand, which cargo doesn't know how to
handle.

Removing the extra quotes solves the issue.
2019-04-03 09:50:38 +02:00
bors[bot]
fdbebccd71 Merge #1076
1076: Const body inference r=flodiebold a=Lapz

This is the second part of #887. I've added type inference on const bodies and introduced the DefWithBody containing Function, Const and Static. I want to add tests but im unsure on how I would go about testing that completions work.


Co-authored-by: Lenard Pratt <l3np27@gmail.com>
2019-04-02 19:01:54 +00:00
Lenard Pratt
b9d2c2c21f made ExprCollector pub(crate) and moved
collect_fn_body_syntax
2019-04-02 19:22:06 +01:00
Lenard Pratt
88e22e9d70 Added const bodies and static body to the ast
and added inference the inference test

reduce code duplication
2019-04-02 19:21:36 +01:00
bors[bot]
01a54f094b Merge #1094
1094: Improve cargo-watch animation and refactoring r=matklad a=edwin0cheng

* Refactoring code and fixed some minor bugs.
* Add more error log and better error handling.
* Add current checking artifact name in Cargo-watch animation.

![new_status_animation](https://i.imgur.com/Zr2JLa5.gif)

Co-authored-by: Edwin Cheng <edwin0cheng@gmail.com>
2019-04-02 18:14:00 +00:00
Edwin Cheng
88bcaf0e18 Add cargo-watch package animation and refactoring 2019-04-03 01:47:10 +08:00
bors[bot]
5cdf525caa Merge #1093
1093: simplify r=matklad a=matklad



Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2019-04-02 16:15:46 +00:00
Aleksey Kladov
cf1caf5181 simplify 2019-04-02 19:15:13 +03:00
bors[bot]
9e46400e0c Merge #1092
1092: always produce source for import r=matklad a=matklad



Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2019-04-02 14:58:27 +00:00
Aleksey Kladov
0de89f786f always produce source for import 2019-04-02 17:58:04 +03:00
Sergey Parilin
b74449e995 Merge remote-tracking branch 'upstream/master' into issue961_profiling 2019-04-02 17:55:14 +03:00
Sergey Parilin
9b73f80959 PR issuse resolved 2019-04-02 17:52:04 +03:00
bors[bot]
0a758a2c48 Merge #1090
1090: always show token text r=matklad a=matklad



Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2019-04-02 13:36:52 +00:00
Aleksey Kladov
7d6bd5d137 always show token text 2019-04-02 14:49:46 +03:00
bors[bot]
78f38a20fd Merge #1091
1091: fix inner block doc comments r=matklad a=matklad



Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2019-04-02 11:43:15 +00:00
Aleksey Kladov
e7a4b96d03 fix inner block doc comments 2019-04-02 14:42:47 +03:00
bors[bot]
2d680ff93a Merge #1089
1089: fix a panic with glob-import missing a source map r=matklad a=matklad



Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2019-04-02 10:26:43 +00:00
Aleksey Kladov
49f13d3a9b fix a panic with glob-import missing a source map 2019-04-02 13:26:09 +03:00
bors[bot]
bb3b159fb7 Merge #1079
1079: Improve cargo-watch usage in vscode plugin r=matklad a=edwin0cheng

*This PR try to improve current cargo-watch usage in VSCode :*

1. Add Multi-lines error support :
![multilines-error](https://i.imgur.com/gbLEwMG.gif)

2. Add cargo-watch status animation :
![cargo-watch-status](https://i.imgur.com/GbHwzjj.gif)

*Implementation Details*

* Current VSCode `ProblemMatcher` still do not support multiple line parsing.
* However we can, spawn a cargo watch process instead of using vscode.Task to allow more control.
* Use `cargo-check --message-format json` to get json format of compiler-message.
* Use `vscode.DiagnosticCollection` to manage the problems directly, which allow multiple lines diagnostic.

However,
* VSCode use non mono-space font for problems, at this moment i cannot find a good solution about it.
* I am not so good in typescript, please let me know if anything is bad in this PR.





Co-authored-by: Edwin Cheng <edwin0cheng@gmail.com>
Co-authored-by: Edwin Cheng <edwin@m-inverse.com>
2019-04-02 10:10:26 +00:00
bors[bot]
b0d2447193 Merge #1088
1088: add minimal comments r=matklad a=matklad



Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2019-04-02 10:02:48 +00:00
Aleksey Kladov
ab19ff16e5 add minimal comments 2019-04-02 13:02:23 +03:00
Aleksey Kladov
0e1e40676a rename flavor to kind 2019-04-02 12:53:44 +03:00
Aleksey Kladov
cb5001c0a5 move extensions to submodules 2019-04-02 12:47:39 +03:00
Edwin Cheng
b60e2f779b Fix prettier error 2019-04-02 17:43:09 +08:00
bors[bot]
370dbc7867 Merge #1087
1087: More future-proof comment kind r=matklad a=matklad



Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2019-04-02 09:34:23 +00:00
Aleksey Kladov
f3a82c372c remove flavor 2019-04-02 12:25:24 +03:00
Aleksey Kladov
5287a2506c More future-proof comment kind 2019-04-02 12:18:52 +03:00
Edwin Cheng
9d26984998 Add terminate process implemntation note 2019-04-02 17:13:14 +08:00
bors[bot]
d21a677715 Merge #1085
1085: add ast::tokens r=matklad a=matklad



Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2019-04-02 07:50:09 +00:00
Aleksey Kladov
3f3ff2f0f4 fix comment naming 2019-04-02 10:48:59 +03:00
Aleksey Kladov
99e6438660 allow empty doc comments 2019-04-02 10:35:34 +03:00
Aleksey Kladov
ae282d8da6 add ast::tokens 2019-04-02 10:23:29 +03:00
Aleksey Kladov
f874d372bb simplify 2019-04-02 10:09:52 +03:00
Edwin Cheng
06053a0a76 Add Cargo.toml file check before cargo watch start 2019-04-02 15:03:31 +08:00
Edwin Cheng
02e450f354 Add cargo-watch.check-arguments 2019-04-02 15:03:31 +08:00
Edwin Cheng
ee05eafe6c Add config for cargo-watch trace 2019-04-02 15:03:31 +08:00
Edwin Cheng
b84d0fc1a3 Add proper process teminate method 2019-04-02 15:03:31 +08:00
Edwin Cheng
c894a3e19b Fix prettier error 2019-04-02 15:03:30 +08:00
Edwin Cheng
6971c7f118 Fixed tslint error 2019-04-02 15:03:30 +08:00
Edwin Cheng
ac8f35019b Fix tslint error 2019-04-02 15:03:30 +08:00
Edwin Cheng
b3683df0cd Improve cargo-watch usage 2019-04-02 15:03:30 +08:00
Aleksey Kladov
bd1f5ba222 move ast traits to a separate file 2019-04-02 10:03:19 +03:00
bors[bot]
c2912892ef Merge #1084
1084: remove dead code r=matklad a=matklad



Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2019-04-01 21:27:45 +00:00
Aleksey Kladov
8014116e5f remove dead code 2019-04-02 00:14:57 +03:00
bors[bot]
9282c6d3d0 Merge #1050
1050: Intelligently add parens when inlining local varaibles r=matklad a=gfreezy

fixed this. https://github.com/rust-analyzer/rust-analyzer/pull/1037#discussion_r268627141

Co-authored-by: gfreezy <gfreezy@gmail.com>
2019-04-01 21:05:10 +00:00