Commit graph

1664 commits

Author SHA1 Message Date
Aleksey Kladov
3e764f97eb hardcode vec macro 2019-01-03 14:48:23 +03:00
bors[bot]
d29e98dd97 Merge #409
409: Add Analysis#teype_of test r=matklad a=h-michael



Co-authored-by: Hirokazu Hata <h.hata.ai.t@gmail.com>
2019-01-03 10:06:32 +00:00
Hirokazu Hata
4363e7b9b2 Deive type_of test from tests 2019-01-03 19:04:42 +09:00
bors[bot]
e92f2ffe27 Merge #410
410: Detangle symbols r=matklad a=matklad

Previously, we used `FileSymbol` both to represent bytes which are stored in the index and as an API of `ra_analysis`. Mixing internal storage format and an API is not a really bright idea, so we introduce `NavigationTarget` to handle API part.

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2019-01-03 09:59:24 +00:00
Aleksey Kladov
8d61853509 docs 2019-01-03 12:57:30 +03:00
Hirokazu Hata
f99e96698c Remove unnecessary mock functions 2019-01-03 18:27:02 +09:00
Aleksey Kladov
03ea6bcbff use LocalPtr in navigation target 2019-01-03 12:26:40 +03:00
Aleksey Kladov
267a89bca2 use LocalSyntaxPtr for file symbol 2019-01-03 12:26:40 +03:00
Aleksey Kladov
f534d2132b move some logic to navigation target 2019-01-03 12:26:40 +03:00
Aleksey Kladov
80a91e6735 add kind to LocalSyntaxPtr 2019-01-03 12:26:40 +03:00
Aleksey Kladov
f673529a33 explain that completion shouldn't do filtering 2019-01-03 12:23:15 +03:00
Hirokazu Hata
f5992964ed Add Analysis#teype_of test 2019-01-03 12:07:20 +09:00
bors[bot]
a4c30d7504 Merge #408
408: vscode problem matcher improvements r=matklad a=vemoo

The problem matcher wasn't working properly and looking at the rustc errors i realized it could be simplified.

I also added a new problem matcher that can be used with https://github.com/passcod/cargo-watch to get the errors in the editor on save. To use it one can create a tasks.json file with:
```json
{
    "version": "2.0.0",
    "tasks": [
        {
            "type": "shell",
            "label": "cargo watch",
            "command": "cargo",
            "isBackground": true,
            "args": [
                "watch",
                "-c"
            ],
            "problemMatcher": [
                "$rustc-watch"
            ]
        }
    ]
}
```
I initially implemented it like this: cff9f62d32 but i think there's a bug in vscode so i worked around it by copying the pattern for both problem matchers. The first commit can be used if https://github.com/Microsoft/vscode/pull/65840 is merged.


Co-authored-by: Bernardo <berublan@gmail.com>
2019-01-02 21:47:44 +00:00
bors[bot]
54efd8204e Merge #407
407: run r=matklad a=matklad



Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2019-01-02 17:13:06 +00:00
Aleksey Kladov
28f6eedba5 simplify runnables 2019-01-02 20:12:38 +03:00
bors[bot]
4f30c45933 Merge #406
406: Simplify r=matklad a=matklad

Get rid of `AnalysisImpl` wrapper around salsa database. It was useful before we migrated by salsa, but it's long have been just a useless boilerplate. 

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2019-01-02 16:42:29 +00:00
Aleksey Kladov
ef08b6c084 fix compilation 2019-01-02 19:41:57 +03:00
Aleksey Kladov
5d483cb998 doctrings 2019-01-02 19:40:41 +03:00
Aleksey Kladov
08d1537468 get rid of AnalysisImpl 2019-01-02 19:20:56 +03:00
bors[bot]
e6aadf6ef2 Merge #405
405: extend selection inside a string literal should select a word first r=matklad a=gfreezy

 fixed #402

Co-authored-by: gfreezy <gfreezy@gmail.com>
2019-01-02 15:49:25 +00:00
gfreezy
9672ae001e extend selection inside a string literal should select a word first 2019-01-02 23:42:38 +08:00
Aleksey Kladov
e9b47dbb36 remove AnalysisHostImpl 2019-01-02 18:41:41 +03:00
Aleksey Kladov
2f22c861a9 remove some methods from analysis impl 2019-01-02 18:11:49 +03:00
Aleksey Kladov
a94530afb3 move world-symbols to file_symbols 2019-01-02 18:08:14 +03:00
bors[bot]
29d8bfb9c9 Merge #404
404: Move FileSymbol to ra_analysis r=matklad a=matklad



Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2019-01-02 14:26:06 +00:00
Aleksey Kladov
76910639e6 fix tests 2019-01-02 17:25:28 +03:00
Aleksey Kladov
fb775a293d make FileSymbol private 2019-01-02 17:11:04 +03:00
Aleksey Kladov
830abe0c1b use navigation target in API 2019-01-02 17:09:39 +03:00
Aleksey Kladov
d25c89f760 introduce navigation target 2019-01-02 16:53:40 +03:00
Aleksey Kladov
a4b4fd7dc5 move symbols to ra_analysis 2019-01-02 16:29:08 +03:00
bors[bot]
afa972e78d Merge #403
403: initial support for macros r=matklad a=matklad

I'll write a more comprehensive description when this is closer to being done. Basically this investigates one question: "how do we represent code which is a result of a macro call". This is an interesting question: currently everything is `FileId` based, but macro expansion does not have a file!

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2019-01-02 13:05:54 +00:00
Aleksey Kladov
1076e82856 small rename 2019-01-02 16:00:35 +03:00
Aleksey Kladov
35b3fc02e0 comments 2019-01-02 16:00:01 +03:00
Aleksey Kladov
4fe0ec5497 rename 2019-01-02 12:49:47 +03:00
Aleksey Kladov
db8d293208 move macro id to ids 2019-01-02 00:37:36 +03:00
Aleksey Kladov
42cc77703b move more stuff to ids 2019-01-02 00:30:00 +03:00
Aleksey Kladov
37ed2f35ba rename MFileId -> HirFileId 2019-01-02 00:09:54 +03:00
Bernardo
96f0683974 named multiline problem patterns are not parsed properly in vscode at the moment 2019-01-01 21:27:36 +01:00
Bernardo
cff9f62d32 fix regex and add rustc-watch problem matcher 2019-01-01 21:27:36 +01:00
Aleksey Kladov
9c65e61849 introduce ids module 2019-01-01 22:47:10 +03:00
Aleksey Kladov
fca1422ea3 add tests for macro generated items 2019-01-01 22:15:35 +03:00
Aleksey Kladov
756e878158 add items from macros to modules 2019-01-01 22:15:35 +03:00
Aleksey Kladov
4a3f76d3bb wip 2019-01-01 22:15:35 +03:00
Aleksey Kladov
f8d419ee89 fix tests 2019-01-01 22:15:35 +03:00
Aleksey Kladov
289391e163 use MFile 2019-01-01 22:15:35 +03:00
Aleksey Kladov
4161466918 introduce MFileId 2019-01-01 22:15:35 +03:00
Aleksey Kladov
9d4af40995 work towards brining macros to nameres 2019-01-01 22:15:35 +03:00
Aleksey Kladov
7dc45745a3 save top-level macros in module items 2019-01-01 22:15:35 +03:00
Aleksey Kladov
e5b2fd6771 hard-code expansion of query_group 2019-01-01 22:15:35 +03:00
Aleksey Kladov
832bae8e28 fix tests 2019-01-01 22:15:35 +03:00