Commit Graph

3870 Commits

Author SHA1 Message Date
bors[bot] 4f4e50db90 Merge #1330
1330: Add Vim and NeoVim setup section r=oblitum a=oblitum



Co-authored-by: Francisco Lopes <francisco@oblita.com>
2019-05-26 05:34:02 +00:00
Francisco Lopes da28dccf62 Add Vim and NeoVim setup section 2019-05-25 18:55:59 -03:00
bors[bot] 91bd783273 Merge #1327
1327: Colorize Rust code as HTML r=matklad a=matklad



Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2019-05-25 10:48:47 +00:00
Aleksey Kladov c6e905a79f Colorize Rust code as HTML 2019-05-25 13:42:34 +03:00
bors[bot] 9800699bab Merge #1318
1318: cargo update r=matklad a=kjeremy

Nothing interesting

Co-authored-by: kjeremy <kjeremy@gmail.com>
2019-05-23 23:06:16 +00:00
bors[bot] 8a9cc67421 Merge #1321
1321: Rustc r=matklad a=matklad



Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2019-05-23 22:50:34 +00:00
Aleksey Kladov 0270b4bc57 reformat 2019-05-24 01:48:44 +03:00
Aleksey Kladov 53ae63835d ⬆️ rustc 2019-05-24 01:46:23 +03:00
kjeremy 60cdd95e17 cargo update 2019-05-23 15:15:35 -04:00
bors[bot] de87fe293e Merge #1317
1317: profile highlighting r=matklad a=matklad



Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2019-05-23 18:25:35 +00:00
Aleksey Kladov f6d2c3f9d5 profile highlighting 2019-05-23 21:19:54 +03:00
bors[bot] afb792acb7 Merge #1316
1316: Simplify code model r=matklad a=matklad

* remove references from types which are now id-based
* remove api/impl separation, as the impl is a tiny fraction of API anyway 

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2019-05-23 18:16:46 +00:00
Aleksey Kladov ef3169a33a rename code_model_api -> code_model 2019-05-23 21:14:19 +03:00
Aleksey Kladov 0e57d58dd0 kill code_model_impl 2019-05-23 21:13:22 +03:00
Aleksey Kladov ce82fbfc44 remove more references 2019-05-23 21:08:10 +03:00
Aleksey Kladov bde9cab66e remove references 2019-05-23 21:01:31 +03:00
Aleksey Kladov 7f22f90503 kill krate_impl 2019-05-23 20:30:09 +03:00
Aleksey Kladov dbd02546b9 fix signature 2019-05-23 20:25:55 +03:00
bors[bot] 1dc9adc6e2 Merge #1290
1290: Add Union to code_model r=matklad a=matklad

@flodiebold I am conflicted about two possible implementation approaches:

* we can add a separate `struct Union` to code model
* we can add `fn is_union(&self)` to existing `Struct`

This PR goes with the former approach, because it seems like Unions are sufficiently different in semantics to warrant a separate types. Which is in contrast to Syntax Tree, where both structs and unions share the same node kind, because their syntax is the same. 

What would be the right thing to do here?

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2019-05-23 17:23:17 +00:00
Aleksey Kladov 5d54aa6781 add union to code_model 2019-05-23 20:18:47 +03:00
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