Commit graph

222 commits

Author SHA1 Message Date
bors[bot]
2acaa92c93 Merge #660
660: Support macro calls in type position r=matklad a=regiontog

A [playground](https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=fdc6dd4ddaece92a72fa2a292b75e27c) demonstrating the syntax in question.

Co-authored-by: Erlend Tobiassen <erlend.tobiassen@gmail.com>
2019-01-26 10:23:28 +00:00
Erlend Tobiassen
e28bd099d6
Support macro calls in type position 2019-01-25 23:56:31 +01:00
Aleksey Kladov
23172a116c rename POS_FIELD -> POS_FIELD_DEF
to match NAMED_FIELD_DEF
2019-01-26 00:24:12 +03:00
Jeremy A. Kolb
7a0bc2dd64 Add docs to struct fields 2019-01-25 14:29:56 -05:00
bors[bot]
675943712c Merge #630
630: Fill in DocumentSymbol::detail r=matklad a=hban

Closes: #516

I just pulled type text from the syntax node and "formatted" is bit. VS Code can't really handle multi-line symbol detail (it's will crop it when rendering), so that formatting will just collapse all white-space to singe space. It isn't pretty, but maybe there's a better way.

Issue also mentions "need to be done for `NavigationTarget` to `SymbolInformation`", but `SymbolInformation` doesn't have detail field on it?

Co-authored-by: Hrvoje Ban <hban@users.noreply.github.com>
2019-01-25 07:13:16 +00:00
bors[bot]
1d4b421aad Merge #633
633: use ToOwned trait instead of inherent method r=matklad a=matklad



Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2019-01-24 23:10:09 +00:00
Aleksey Kladov
2e354f480b use ToOwned trait instead of inherent method 2019-01-25 02:09:31 +03:00
bors[bot]
c42db0bbd7 Merge #623
623: WIP: module id is not def id r=matklad a=matklad

This achieves two things:

* makes module_tree & item_map per crate, not per source_root
* begins the refactoring to remove universal `DefId` in favor of having separate ids for each kind of `Def`. Currently, only modules get a differnt ID though. 

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2019-01-24 22:56:13 +00:00
Aleksey Kladov
0f2f3a21e7 Migrate trait & type to new ids 2019-01-25 01:31:32 +03:00
DJMcNab
107d6a0a16 Reformat 2019-01-24 22:01:49 +00:00
Daniel McNab
82dfb00157
Apply suggestions from code review
Co-Authored-By: DJMcNab <36049421+DJMcNab@users.noreply.github.com>
2019-01-24 21:41:02 +00:00
DJMcNab
f0e5a314b0 Dedupe PATH_FIRST in ATOM_EXPR_FIRST 2019-01-24 21:31:43 +00:00
DJMcNab
4899e7be76 Support universal function call syntax in function calls 2019-01-24 21:19:16 +00:00
Hrvoje Ban
4eff8ddb8b Fill in DocumentSymbol::detail 2019-01-24 19:05:26 +01:00
Aleksey Kladov
566c8e321e migrate enums to new id 2019-01-24 18:56:38 +03:00
Aleksey Kladov
a00570d7a3 minor rename 2019-01-24 13:40:36 +03:00
Jeremy A. Kolb
6a6ce2bc95 Make EnumVariant a DocCommentsOwner 2019-01-23 16:23:21 -05:00
Josh Robson Chase
2ffea72f74 More correct raw ident handling 2019-01-23 13:57:17 -05:00
Josh Robson Chase
3b70acad01 Use IDENT for both raw and normal idents 2019-01-23 13:19:49 -05:00
Josh Robson Chase
1cd6d6539a Add raw idents to lexer and parser 2019-01-23 13:17:41 -05:00
Aleksey Kladov
d4ed25d86f introduced better typed AstPtr 2019-01-23 18:26:02 +03:00
Aleksey Kladov
7b901f86cd move SyntaxPtr to ra_syntax 2019-01-23 17:37:10 +03:00
gfreezy
13d2fd32ab fix completion bugs 2019-01-23 15:43:47 +08:00
Aleksey Kladov
7b28a15202 ⬆️ rowan 2019-01-22 23:37:03 +03:00
Erlend Tobiassen
c550c6759d
Add test for placeholder parameters in trait fn defs 2019-01-22 18:46:15 +01:00
Erlend Tobiassen
234b65fd61 Allow placeholder parameters in trait fn defs 2019-01-22 18:33:53 +01:00
Erlend Tobiassen
84f888e93d No need for is_type_start 2019-01-22 14:46:06 +01:00
Erlend Tobiassen
9f3d133813 Prefer TYPE_FIRST 2019-01-22 14:36:57 +01:00
Erlend Tobiassen
8198cde13b
Update tests after allowing where predicate to accept types 2019-01-22 14:32:23 +01:00
Erlend Tobiassen
2b22f5fb43 Optimistically bail out of where clause loop if not at start of a type or lifetime 2019-01-22 13:17:10 +01:00
Erlend Tobiassen
1aba42128f Don't leave a marker hanging without completing it. 2019-01-22 01:25:00 +01:00
Erlend Tobiassen
1059ec74e2 Allow types to the left of : in where predicates. 2019-01-22 01:11:35 +01:00
Florian Diebold
5862542ded Add AST/HIR for type args in path segments 2019-01-19 16:02:06 +01:00
Marcus Klaas de Vries
fa43ef30f4 Change parsing of struct field patterns 2019-01-19 15:37:26 +03:00
Marcus Klaas de Vries
f9a6050034 Move parsing of field pattern lists to the parser (where it belongs) 2019-01-19 15:37:26 +03:00
Marcus Klaas de Vries
d48d5b8b6c Add initial (flawed) implementation of binding annotations 2019-01-19 15:37:26 +03:00
Marcus Klaas de Vries
ac216880f5 Implement unlabeled struct field pattern inference 2019-01-19 15:37:25 +03:00
Marcus Klaas de Vries
ab5deb7811 Create struct patterns up to the hir level 2019-01-19 15:37:25 +03:00
Marcus Klaas de Vries
afaa26636e Add additional pattern variants 2019-01-19 15:37:25 +03:00
Aleksey Kladov
b82fe73d1a make token set a const-fn 2019-01-19 15:36:58 +03:00
Hirokazu Hata
4729a1b054 Update ARRAY_EXPR grammar 2019-01-16 23:22:14 +09:00
bors[bot]
d75a0368f5 Merge #536
536: Introduce variable semicolon block expr r=matklad a=yerke

Fix for https://github.com/rust-analyzer/rust-analyzer/issues/504

Feels a bit hacky...

Co-authored-by: Yerkebulan Tulibergenov <yerkebulan@gmail.com>
2019-01-16 06:20:09 +00:00
Yerkebulan Tulibergenov
5e35f191fc add has_semi to ExprStmt 2019-01-15 20:26:46 -08:00
Marcus Klaas de Vries
d67eabb512 Fix type inference for raw (byte) strings 2019-01-14 20:56:14 +01:00
Marcus Klaas de Vries
a9a6a50c75 Fixup tests 2019-01-14 19:30:21 +01:00
Marcus Klaas de Vries
606d66a714 Start moving literal interpretation to the AST (WIP) 2019-01-14 13:56:43 +01:00
Marcus Klaas de Vries
5f5dc20d85 Try implementing integer type inference (WIP) 2019-01-14 13:52:57 +01:00
Marcus Klaas de Vries
a6146d35b1 Implement type inference for literals (WIP) 2019-01-14 13:52:55 +01:00
Hirokazu Hata
6efda8f6ce Update TUPLE_EXPR grammar 2019-01-13 21:04:03 +09:00
Aleksey Kladov
8e554ea5fa support ref-patterns 2019-01-13 13:36:06 +03:00