Commit Graph

4526 Commits

Author SHA1 Message Date
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
gfreezy
4ca51cfbcf intelligently add parens when inlining local varaibles 2019-04-01 22:53:47 +08:00
bors[bot]
56f3524c69 Merge #1082
1082: Async block in argument position r=matklad a=andreytkachenko

Fixes case when async block appears in argument position

Co-authored-by: Andrey Tkachenko <andreytkachenko64@gmail.com>
2019-04-01 11:22:13 +00:00
Andrey Tkachenko
e89b97524a Async block in argument position 2019-04-01 15:15:41 +04:00
bors[bot]
b7e26c32a1 Merge #1067
1067: Take number of arguments at the call-site into account for signature help r=matklad a=kjeremy

Fixes #1065

Co-authored-by: kjeremy <kjeremy@gmail.com>
2019-04-01 11:15:34 +00:00
bors[bot]
6e4865de73 Merge #1081
1081: Async closure syntax r=matklad a=robojumper

Fixes #1080.

Also fixes an error introduced by #1072 where something like `async move "foo"` in expression position would trigger the assertion in `block_expr`.

Co-authored-by: robojumper <robojumper@gmail.com>
2019-04-01 10:57:06 +00:00
bors[bot]
42a883f06c Merge #1078
1078: rewrite syntax trees r=matklad a=matklad



Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2019-04-01 09:30:25 +00:00
Aleksey Kladov
9e213385c9 switch to new rowan 2019-04-01 12:06:24 +03:00
robojumper
d43dff43b4 Async closure syntax 2019-03-31 16:35:22 +02:00
bors[bot]
dec9bde108 Merge #1038
1038: Add WherePred to allow predicate access in WhereClause r=matklad a=vipentti

Lifetime bounds in where predicates are now also parsed into `TYPE_BOUND_LIST` to allow unified access to bounds.

Co-authored-by: Ville Penttinen <villem.penttinen@gmail.com>
2019-03-31 10:43:50 +00:00
Ville Penttinen
3f62ab8f51 Add WherePred to allow predicate access in WhereClause
This also unifies parsing of WHERE_PRED bounds, now Lifetime bounds will also be
parsed using TYPE_BOUND_LIST
2019-03-31 13:20:56 +03:00
bors[bot]
4666138c91 Merge #1072
1072: recognize async move blocks r=matklad a=memoryruins

closes #1053 

Co-authored-by: memoryruins <memoryruinsmusic@gmail.com>
2019-03-31 09:18:21 +00:00
bors[bot]
c5ca49678f Merge #1077
1077: Improve parsing of type bounds r=matklad a=vipentti

This adds new TYPE_BOUND_LIST and TYPE_BOUND syntax kinds. These are now used when parsing type bounds. In addition parsing paths inside a bound now does not recursively parse paths, rather they are treated as separate bounds, separated by +.

Basically now the generic params `struct S<T: 'a + ?Sized + (Copy)>;` in will be parsed as 

```
TYPE_PARAM_LIST@[8; 33)
  L_ANGLE@[8; 9)
  TYPE_PARAM@[9; 32)
    NAME@[9; 10)
      IDENT@[9; 10) "T"
    COLON@[10; 11)
    WHITESPACE@[11; 12)
    TYPE_BOUND_LIST@[12; 32)
      TYPE_BOUND@[12; 14)
        LIFETIME@[12; 14) "'a"
      WHITESPACE@[14; 15)
      PLUS@[15; 16)
      WHITESPACE@[16; 17)
      TYPE_BOUND@[17; 23)
        QUESTION@[17; 18)
        PATH_TYPE@[18; 23)
          PATH@[18; 23)
            PATH_SEGMENT@[18; 23)
              NAME_REF@[18; 23)
                IDENT@[18; 23) "Sized"
      WHITESPACE@[23; 24)
      PLUS@[24; 25)
      WHITESPACE@[25; 26)
      TYPE_BOUND@[26; 32)
        L_PAREN@[26; 27)
        PATH_TYPE@[27; 31)
          PATH@[27; 31)
            PATH_SEGMENT@[27; 31)
              NAME_REF@[27; 31)
                IDENT@[27; 31) "Copy"
        R_PAREN@[31; 32)
  R_ANGLE@[32; 33)
```

Previously it was parsed, with the paths nested:

```
TYPE_PARAM_LIST@[8; 33)
  L_ANGLE@[8; 9)
  TYPE_PARAM@[9; 32)
    NAME@[9; 10)
      IDENT@[9; 10) "T"
    COLON@[10; 11)
    WHITESPACE@[11; 12)
    LIFETIME@[12; 14) "'a"
    WHITESPACE@[14; 15)
    PLUS@[15; 16)
    WHITESPACE@[16; 17)
    QUESTION@[17; 18)
    PATH_TYPE@[18; 32)
      PATH@[18; 23)
        PATH_SEGMENT@[18; 23)
          NAME_REF@[18; 23)
            IDENT@[18; 23) "Sized"
      WHITESPACE@[23; 24)
      PLUS@[24; 25)
      WHITESPACE@[25; 26)
      L_PAREN@[26; 27)
      PATH_TYPE@[27; 31)
        PATH@[27; 31)
          PATH_SEGMENT@[27; 31)
            NAME_REF@[27; 31)
              IDENT@[27; 31) "Copy"
      R_PAREN@[31; 32)
  R_ANGLE@[32; 33)
```

Looking for feedback.



Co-authored-by: Ville Penttinen <villem.penttinen@gmail.com>
2019-03-31 09:11:48 +00:00
Ville Penttinen
55dcdb7d09 Add trait ast::TypeBoundsOwner 2019-03-31 10:56:48 +03:00
Ville Penttinen
245c0d8584 Update tests 2019-03-31 10:39:23 +03:00