Commit Graph

3530 Commits

Author SHA1 Message Date
bors[bot]
449eea1161 Merge #1039
1039: Support references in higher-ranked trait bounds r=matklad a=vipentti

Fixes #1020

Co-authored-by: Ville Penttinen <villem.penttinen@gmail.com>
2019-03-24 19:49:53 +00:00
Ville Penttinen
95505e80fc Support references in higher-ranked trait bounds
Fixes #1020
2019-03-24 20:51:55 +02:00
Marco Groppo
acac7415a6 Minor formatting changes. 2019-03-24 15:12:39 +01:00
Marco Groppo
481d3f56cf Assist to flip equality (==) and negative equality (!=) operands. 2019-03-24 14:42:11 +01:00
robojumper
022d88cf4c Add docs build 2019-03-23 22:03:41 +01:00
bors[bot]
18a8f48039 Merge #1031
1031: Move most things out of ra_ide_api_light r=matklad a=detrumi

This moves everything except `structure` out of `ra_ide_api_light`. So this PR and #1019 finish up #1009, whichever is merged last should probably remove the `ra_ide_api_light` crate.

Also, `LocalEdit` was removed since it wasn't used any more.

Co-authored-by: Wilco Kusee <wilcokusee@gmail.com>
2019-03-23 17:25:40 +00:00
bors[bot]
2dfb47cc3d Merge #1032
1032: Fix apply_substs assertion failure r=matklad a=flodiebold

Fixes #1030.

Co-authored-by: Florian Diebold <flodiebold@gmail.com>
2019-03-23 17:18:39 +00:00
Florian Diebold
dbfc68cea0 Fix apply_substs assertion failure
Fixes #1030.
2019-03-23 18:03:09 +01:00
Wilco Kusee
a3711e08dc Move highlighting and matching_brace 2019-03-23 17:34:49 +01:00
Wilco Kusee
a656b891fb Remove LocalEdit usage 2019-03-23 17:00:49 +01:00
gfreezy
02383b91d5 Add assist for adding default methods 2019-03-23 23:13:07 +08:00
gfreezy
d99ae9ba56 Add impl members assist shold not copy docstrings, attrs and default methods. 2019-03-23 22:49:20 +08:00
bors[bot]
5a6a3d0777 Merge #1027
1027: remove obsolete diagnostic r=matklad a=matklad



Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2019-03-23 13:32:42 +00:00
Aleksey Kladov
46a21b07e6 remove obsolete diagnostic 2019-03-23 16:31:11 +03:00
bors[bot]
bce55c749a Merge #1026
1026: rename persistent hir database -> def database r=matklad a=matklad



Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2019-03-23 12:44:47 +00:00
Aleksey Kladov
3f0cf6ebe1 rename persistent hir database -> def database 2019-03-23 15:44:24 +03:00
bors[bot]
331220fee2 Merge #1025
1025: Disable fork feature for proptest r=matklad a=detrumi



Co-authored-by: Wilco Kusee <wilcokusee@gmail.com>
2019-03-23 12:09:07 +00:00
Wilco Kusee
0c15deac76 Move typing to ra_ide_api 2019-03-23 12:11:46 +01:00
Aleksey Kladov
d99abe4c25 document work list 2019-03-23 12:56:47 +03:00
bors[bot]
3d7a330f32 Merge #990
990: Forbid TODO markers on master branch r=matklad a=matklad

this makes TODO markers useful for things which you want to fix before sending a PR

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2019-03-23 08:07:30 +00:00
Aleksey Kladov
4fd8cfd6ad replace todo with fixme 2019-03-23 11:07:09 +03:00
Wilco Kusee
497934a7b4 Disable fork feature for proptest 2019-03-23 08:57:07 +01:00
Aleksey Kladov
2394a2ee35 forbid todo markers 2019-03-23 10:53:28 +03:00
bors[bot]
15189bc724 Merge #1021
1021: Wasm dependencies r=matklad a=detrumi

As a first step towards running RA on WASM (see #1007), this tweaks the dependencies somewhat so that projects built using `wasm-pack` can use `ra_ide_api` as a dependency.

There were two problems:
- use of undeclared type or module `MmapInner`
This error occurred because of the `memmap` crate, as a dependency of `fst`
Solution: specify `default-features = false` for the `fst` package (see https://github.com/BurntSushi/fst/issues/70)

- use of undeclared type or module `imp`
This happened in the `wait-timeout` crate ([which uses `Command` under the hood](https://github.com/alexcrichton/wait-timeout/issues/18)), a dependency of `rusty-fork` which is a dependency of `proptest`.
Solution: move `proptest` to dev-dependencies and add `#[cfg(test)]` to the `test_utils` crate.
**Edit:** Oh, that causes trouble with resolving the import when running the tests. Hmm...

Co-authored-by: Wilco Kusee <wilcokusee@gmail.com>
2019-03-22 20:22:37 +00:00
Wilco Kusee
4e6d0933cc
Disable memmap feature in fst dependency 2019-03-22 21:22:03 +01:00
bors[bot]
3604f23e98 Merge #1012
1012: Move join_lines and test_utils to ra_ide_api r=matklad a=detrumi

Part of #1009 

Co-authored-by: Wilco Kusee <wilcokusee@gmail.com>
2019-03-22 17:56:23 +00:00
Wilco Kusee
01bca7114c Simplify changes and fix tests 2019-03-22 17:12:32 +01:00
Wilco Kusee
9bd8336c51 Remove LocalEdit usage 2019-03-22 17:12:32 +01:00
Wilco Kusee
58e77660de Move join_lines to ra_ide_api 2019-03-22 17:12:31 +01:00
bors[bot]
6e324d38d6 Merge #1016
1016: Move folding_ranges to ra_ide_api r=pasa a=pasa

folding_ranges part of #1009 

Co-authored-by: Sergey Parilin <sergey.parilin@fxdd.com>
2019-03-22 13:57:07 +00:00
Sergey Parilin
47c501bcfb Move folding_ranges to ra_ide_api 2019-03-22 16:31:21 +03:00
bors[bot]
708a7d24c5 Merge #1017
1017: line_index and line_index_utils moved to ra_ide_api r=matklad a=pasa

line_index and line_index_utils for issue #1009 

Co-authored-by: Sergey Parilin <sergey.parilin@fxdd.com>
2019-03-22 12:38:59 +00:00
bors[bot]
6bc09e2ff8 Merge #1015
1015: Change primitive integers to have signedness and bitness r=matklad a=yanchith

Fixes #1004 

This creates enums: `Signedness`, `IntBitness` and `FloatBitness`, and condenses `UintTy` with `IntTy`, making use of the created enums. `FloatTy` is also changed from an enum into a struct containing `FloatBitness`.

`UncertainIntTy` and `UncertainFloatTy` now look much more similar.

`Ord` was removed from the types because `{u,i}size` aren't easily orderable with the rest. Fortunately this wasn't depended on anywhere.

Co-authored-by: yanchith <yanchi.toth@gmail.com>
2019-03-22 12:27:54 +00:00
Sergey Parilin
fda70badf8 line_index and line_index_utils moved to ra_ide_api 2019-03-22 15:24:43 +03:00
yanchith
504c8c7c2e Refactor primitive types into more orthogonal representation 2019-03-22 10:09:35 +01:00
bors[bot]
2a6544f906 Merge #1013
1013: Fuzz reparsing and fix found bugs r=matklad a=pcpthm

Add fuzz test for reparsing which:
- Checks reparsing doesn't panic and validate result syntax tree.
- Checks that incremental reparsing produces the same syntax tree as full reparse.
- Check for that errors are the same as full reparsing is disabled because errors are less important than syntax tree and produce failures which I couldn't figure out how to fix immediately (FIXME comment).

I guess the current input generation is inefficient but still found several bugs:
- Arithmetic overflow (negative result on an unsigned type). I changed the signature of `SyntaxError::add_offset` to solve this problem.
- When reparsing a leaf, the token of the leaf can be joined to the next characters. Such case was not considered.
- UNDERSCORE token was not produced when text length is exactly 1 (not a reparsing bug).
- When reparsing a block, *inner* curly braces should be balanced. i.e. `{}{}` is invalid.
- Effects of deleting newlines were not considered.

Co-authored-by: pcpthm <pcpthm@gmail.com>
2019-03-22 05:48:55 +00:00
bors[bot]
ed823cb38d Merge #1014
1014: Don't execute cargo watch when information message is dismissed r=matklad a=pcpthm

I think most information messages on `VSCode` have such behavior.

Co-authored-by: pcpthm <pcpthm@gmail.com>
2019-03-22 05:39:55 +00:00
bors[bot]
9c6c6a7cb5 Merge #988
988: Consolidate Ty variants into a new variant Ty::Apply r=matklad a=flodiebold

This gets us a lot closer to Chalk. It also introduces a lot of boilerplate, though, especially when matching :/ A lot of this can probably be refactored to be nicer, though.

Co-authored-by: Florian Diebold <flodiebold@gmail.com>
2019-03-22 05:32:48 +00:00
pcpthm
1529eeb1b3 Don't execute cargo watch when popup is dismissed 2019-03-22 09:38:48 +09:00
pcpthm
bf8e7930da Fix reparsing failure when removing newline 2019-03-22 08:09:11 +09:00
pcpthm
edbc18516d Fix reparsing bug on "{}{}" 2019-03-22 08:09:11 +09:00
pcpthm
7669113e7c Completely ignore errors for reparse fuzz 2019-03-22 08:09:11 +09:00
pcpthm
c60ec02d75 Use template text to improve reparse fuzzing 2019-03-22 08:09:11 +09:00
pcpthm
ec59d9bda5 Fix lexer not producing right token on "_" 2019-03-22 08:09:11 +09:00
pcpthm
9623e77d9f Fix reparsing bug when lex result is different 2019-03-22 08:09:11 +09:00
pcpthm
c622000413 Improve reparse fuzz test 2019-03-22 08:09:11 +09:00
pcpthm
0acb61a911 Fix an arithmetic overflow in reparser 2019-03-22 08:09:11 +09:00
pcpthm
4c7142d0c9 Add fuzz test for reparsing 2019-03-22 08:04:48 +09:00
pcpthm
e734190c24 Refactor parser fuzz testing 2019-03-22 08:04:48 +09:00
Florian Diebold
1ee779d1f7 Assert in apply_substs that the number of parameters doesn't change
... and fix a small bug revealed by that.
2019-03-21 22:39:31 +01:00