Commit Graph

3850 Commits

Author SHA1 Message Date
bors[bot]
ef00b5af1c Merge #1312
1312: Introduce TokenBuffer r=matklad a=edwin0cheng

As discussed in Zulip, this PR Introduce `TokenBuffer` , a safe version of  `syn` crate `TokenBuffer` which support cursor based traversal of `tt::TokenTree`. This is the basis of incoming refactoring of `TokenSource` iterator based API.

This PR do the following things:

* Add TokenBuffer in `ra_tt` crate.
* Try to use this new API to refactor the `SubtreeSource` to prove it usage.




Co-authored-by: Edwin Cheng <edwin0cheng@gmail.com>
2019-05-23 14:31:26 +00:00
bors[bot]
eef24bddc9 Merge #1315
1315: Use Xenial image and fix find call r=matklad a=lnicola



Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
2019-05-23 13:16:41 +00:00
Edwin Cheng
63b67134fd Use slice instead of Vec 2019-05-23 21:05:22 +08:00
Laurențiu Nicola
48077d0653 Use Xenial image and fix find call 2019-05-23 16:05:01 +03:00
bors[bot]
c290bb0749 Merge #1305
1305: Try to resolve name refs during highlighting r=matklad a=lnicola

Preview:

![image](https://user-images.githubusercontent.com/308347/58253075-43464a80-7d70-11e9-84cc-e81990f2d3eb.png)

This is probably not the cleanest implementation, but it's not clear to me what parts of `reference_definition` we don't want to run at this point. Also, is the `SourceAnalyzer` cheap enough to construct for each `NameRef`? Not like there's any alternative at this point, though.

Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
2019-05-23 12:52:59 +00:00
Laurențiu Nicola
f1ec88cc56 Improve highlighting of name refs 2019-05-23 15:31:35 +03:00
bors[bot]
4466568525 Merge #1311
1311: Move NameRef classification logic out of reference_definition r=matklad a=lnicola



Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
2019-05-23 09:39:22 +00:00
Laurențiu Nicola
444e52e519 Move NameRef classification logic out of reference_definition 2019-05-23 12:32:47 +03:00
bors[bot]
078c0e26c3 Merge #1313
1313: Update `gen_lsp_server` examples r=matklad a=dmoonfire

- updated the documentation with an example that has no errors with current compiler
- added two example code to test compilation and show in use
  - one example is the bare bones version in documentation
  - the other example is the same but with logging statements to show flow

Co-authored-by: Dylan Moonfire <dylan.moonfire@ryan.com>
2019-05-23 09:23:36 +00:00
Dylan Moonfire
cbd131acbe updated gen_lsp_server examples
- updated the documentation with an example that has no errors with current compiler
- added two example code to test compilation and show in use
2019-05-22 20:35:12 -05:00
Edwin Cheng
27ae626cfb Formatting 2019-05-23 09:31:36 +08:00
Edwin Cheng
dd50ca7c5e Refactor SubtreeSource 2019-05-23 02:23:56 +08:00
Edwin Cheng
4d7a567bc5 Introduce TokenBuffer 2019-05-23 02:09:26 +08:00
Aleksey Kladov
a25e103e45
mention why enableEnhancedTyping is needed 2019-05-22 15:04:30 +03:00
bors[bot]
35b60d6893 Merge #1308
1308: add profile calls to parsing/expansion routines r=matklad a=matklad



Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2019-05-22 08:40:09 +00:00
Aleksey Kladov
f15bb3c98a add profile calls to parsing/expansion routines 2019-05-22 11:31:07 +03:00
bors[bot]
67d5927b16 Merge #1281
1281: Move arm cond to match guard r=matklad a=unrealhoang

I did split the rename to another commit, yet Github UI still show entirely new file change. Please review using commits.

Co-authored-by: Unreal Hoang <unrealhoang@gmail.com>
2019-05-22 07:39:54 +00:00
bors[bot]
4199f4e2c3 Merge #1307
1307: better profilig r=matklad a=matklad



Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2019-05-21 21:01:28 +00:00
Aleksey Kladov
6fed943bd2 better profilig 2019-05-22 00:00:58 +03:00
bors[bot]
366ad6f03b Merge #1306
1306: Chalk fuel r=matklad a=flodiebold

This switches Chalk to my fuel branch, and limits the fuel for trait solving. This should improve worst-case performance; for example, we can now run `ra_cli analysis-stats` against rustc again. This also fixes a bug found doing that.

Co-authored-by: Florian Diebold <flodiebold@gmail.com>
2019-05-21 19:07:35 +00:00
Florian Diebold
ced971ee9f Fix crash with int vars in canonicalization 2019-05-21 20:40:29 +02:00
Florian Diebold
f613c48d2e Use fuel branch for Chalk
This makes sure we don't take too long in trait solving.
2019-05-21 20:40:29 +02:00
Aleksey Kladov
ed943adb29 re-enable chalk 2019-05-21 20:57:36 +03:00
Aleksey Kladov
26463f189f publish gen_lsp_server 0.2 2019-05-21 18:57:33 +03:00
Aleksey Kladov
9f03c07812 fix logo 2019-05-21 17:43:24 +03:00
Unreal Hoang
079ed6011a
add feature doc 2019-05-21 23:31:57 +09:00
Unreal Hoang
08e954f0fd
add assist to move arm condition to match guard 2019-05-21 23:31:51 +09:00
bors[bot]
51e82fe6d2 Merge #1299
1299: Use ThemeColor and add support for light themes r=matklad a=lnicola

Part of #1294.

- switch to `ThemeColor`
- add light and high contrast theme definitions
- highlight control flow keywords and `unsafe`


Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
2019-05-21 13:58:42 +00:00
bors[bot]
c6a5d871d7 Merge #1302
1302: profile type inference r=matklad a=matklad



Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2019-05-21 13:49:18 +00:00
Laurențiu Nicola
b08362f6d2 Address feedback 2019-05-21 16:28:10 +03:00
Aleksey Kladov
f63be06002 profile type inference 2019-05-21 16:26:13 +03:00
Aleksey Kladov
0f3e85002b profile implements query 2019-05-21 16:04:17 +03:00
bors[bot]
9fe8e56177 Merge #1301
1301: fix odrer-of-iteration bug in tests r=matklad a=matklad



Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2019-05-21 11:53:27 +00:00
Aleksey Kladov
908c9589a8 fix odrer-of-iteration bug in tests 2019-05-21 14:51:52 +03:00
Laurențiu Nicola
9ade271a67 Use ThemeColor and add support for light themes 2019-05-21 14:19:08 +03:00
bors[bot]
772311392f Merge #1300
1300: sort hash maps for tests r=matklad a=matklad



Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2019-05-21 11:14:54 +00:00
Aleksey Kladov
0efb5364c3 sort hash maps for tests 2019-05-21 14:14:31 +03:00
bors[bot]
8b6f02d0d6 Merge #1297
1297: mozilla is sponsoring as well r=matklad a=nikomatsakis



Co-authored-by: Niko Matsakis <niko@alum.mit.edu>
2019-05-21 10:40:33 +00:00
bors[bot]
c59a3cdb03 Merge #1296
1296: ⬆️ insta r=matklad a=matklad



Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2019-05-21 10:28:55 +00:00
Niko Matsakis
02ecd6727a
mozilla is sponsoring as well 2019-05-21 06:27:07 -04:00
Aleksey Kladov
507c97a18c ⬆️ insta 2019-05-21 13:21:54 +03:00
bors[bot]
3db7bdb6b7 Merge #1295
1295: add _query to query functions r=matklad a=matklad



Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2019-05-21 10:19:20 +00:00
Aleksey Kladov
69341a0bbe add _query to query functions 2019-05-21 12:44:08 +03:00
bors[bot]
eabfe3902f Merge #1293
1293: Pass `--all-targets` to `cargo watch` r=matklad a=aleksijuvani

A trivial change, but passes the `--all-targets` flag to `cargo watch`. This enables inline diagnostics for the example, bin and test targets. Previously, modifying an example would trigger a change notification for `cargo watch`, but `cargo check` does not actually check these unless either `--all-targets` or `--examples` is specified.

Co-authored-by: Aleksi Juvani <aleksi@aleksijuvani.com>
2019-05-21 07:23:21 +00:00
Aleksi Juvani
854dac335d Pass --all-targets to cargo watch 2019-05-21 09:44:28 +03:00
bors[bot]
4369c1c4a1 Merge #1291
1291: add is_union to structs AST r=matklad a=matklad



Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2019-05-20 22:16:21 +00:00
Aleksey Kladov
765f93b8d8 add is_union to structs AST 2019-05-21 01:15:56 +03:00
Aleksey Kladov
4ca8331933 remove minor code duplication 2019-05-21 01:02:29 +03:00
bors[bot]
9383ae720b Merge #1289
1289: simplify r=matklad a=matklad



Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2019-05-20 20:02:18 +00:00
Aleksey Kladov
9680ae865e simplify 2019-05-20 23:01:49 +03:00