Commit graph

502 commits

Author SHA1 Message Date
Lukas Wirth
d644728d82 Refactor reference searching to work with the ast 2021-02-12 18:58:28 +01:00
Lukas Wirth
43ccbf4360 Remove unused ReferenceSearchResult functions 2021-02-12 18:58:28 +01:00
bors[bot]
dee5aba43a
Merge #7644
7644: Primitive completion r=jonas-schievink a=jonas-schievink

Fixes https://github.com/rust-analyzer/rust-analyzer/issues/7642

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
2021-02-12 13:18:30 +00:00
Jonas Schievink
70f388cedb Pin Rust to 1.49.0 on CI 2021-02-12 13:05:56 +01:00
Jonas Schievink
216dc856c5 Wrap BuiltinType in code model 2021-02-11 19:52:33 +01:00
Jonas Schievink
244d8e37f1 Update fixed tests 2021-02-10 14:48:52 +01:00
Lukas Wirth
a195711df0 Resolve TupleStructPat in SourceAnalyzer::resolve_path 2021-02-10 09:37:22 +01:00
Aleksey Kladov
61f15b72ac Add parsing benchmark 2021-02-09 21:52:34 +03:00
Aleksey Kladov
4b1279d0b1 Infra for "unit" benchmarking 2021-02-09 20:25:39 +03:00
Aleksey Kladov
9ea2c96ddd restore accidentally deleted test 2021-02-09 18:29:15 +03:00
Aleksey Kladov
ef8f38efc6 More precise navigation to parent 2021-02-09 18:21:09 +03:00
Aleksey Kladov
2ac20b05f1 Cleanup tests 2021-02-09 18:13:11 +03:00
Aleksey Kladov
2dc67c85b9 Cleanup test 2021-02-09 17:48:25 +03:00
Aleksey Kladov
5ddfde3038 Modernize tests 2021-02-09 17:23:35 +03:00
Aleksey Kladov
7022ea52b5 AdtDef -> Adt 2021-02-07 14:15:02 +03:00
Lukas Wirth
34d5d77cfa Increase Highlights highlight range to covering element 2021-02-04 11:37:14 +01:00
lumenian
cafaab8b96 Show alias underlying type 2021-02-02 17:47:56 +03:00
Lukas Wirth
999e020da2 Return inner attributes of outline mod declarations in attrs_query 2021-01-31 19:53:01 +01:00
Lukas Wirth
426ad8e165 Classify function calls as functions when shadowed by types 2021-01-28 19:08:55 +01:00
bors[bot]
c76cab6247
Merge #7465
7465: Only hide parameter hints for path, field and methodcall expressions r=SomeoneToIgnore a=Veykril

Doing this check for other expressions makes little sense to me.

Fixes #7458

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-01-27 14:40:57 +00:00
Lukas Wirth
0aaa61cd56 Only hide parameter hints for path, field and methodcall expressions 2021-01-27 15:03:43 +01:00
Aleksey Kladov
d35bda6429 Make always-assert crate reusable 2021-01-26 22:13:42 +03:00
Lukas Wirth
d912444cac Shorten hir::TypeParam full_range in NavigationTarget 2021-01-26 01:01:00 +01:00
Lukas Wirth
a872ebf81f Support unions in symbol search 2021-01-24 01:32:52 +01:00
Phil Ellison
db6dda94a3 Remove use of SourceFileEdit 2021-01-23 07:54:45 +00:00
Phil Ellison
920e57bd15 cargo fmt 2021-01-23 07:40:25 +00:00
Phil Ellison
e62e4ed148 Address review comments 2021-01-23 07:40:25 +00:00
Phil Ellison
449ced4d21 cargo fmt 2021-01-23 07:40:25 +00:00
Phil Ellison
1ff860b93c Implement fix, add tests 2021-01-23 07:40:25 +00:00
Phil Ellison
1316422a7c Add diagnostic for filter_map followed by next 2021-01-23 07:40:24 +00:00
bors[bot]
0c37b3a0fc
Merge #7353
7353: Add LifetimeParam and ConstParam to CompletionItemKind r=matklad a=Veykril

Adds `LifetimeParam` and `ConstParam` to `CompletionItemKind` and maps them both to `TypeParam` in the protocol conversion as there are no equivalents, so nothing really changes there.
`ConstParam` could be mapped to `Const` I guess but I'm split on whether that would be better?

Additions were solely inspired by (the single) test output for const params.

Also sorts the variants of `CompletionItemKind` and its to_proto match.



Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-01-22 15:31:47 +00:00
bors[bot]
1b96c79ab5
Merge #7348
7348: Fix broken link in intra-doc r=edwin0cheng a=sasurau4

Fix #5546 
The intra-doc link doesn't work fine for trait associated method.

Co-authored-by: Daiki Ihara <sasurau4@gmail.com>
2021-01-22 12:29:42 +00:00
Aleksey Kladov
f67a2eedf5 Cleanup tests 2021-01-22 15:13:18 +03:00
Aleksey Kladov
2c786f1b98 Remove index based fallback for goto def
We are so precise that the fallback creates more confusion, when you can
goto def on an unresolved reference.
2021-01-22 15:11:29 +03:00
Daiki Ihara
f5b97e52c9 Fix broken link in intra-doc 2021-01-22 20:06:45 +09:00
Aleksey Kladov
e5c5c0a040 Include countme crate to count important data structures. 2021-01-21 19:30:52 +03:00
Jonas Schievink
82146737ac Treat BlockExpr as a potential module origin 2021-01-20 20:05:48 +01:00
Lukas Wirth
563a175fdb Move SymbolKind to ide_db 2021-01-20 15:25:34 +01:00
Aleksey Kladov
74f8201586 Avoid intermediate collections 2021-01-20 14:49:29 +03:00
Aleksey Kladov
724059569b Don't show runnable suggestions for other files
It't be actually great to have these once we have run anything dialog,
but for run the thing at point it makes sense to show a limited set.
2021-01-20 14:30:50 +03:00
Aleksey Kladov
46b4f89c92 . 2021-01-20 01:56:11 +03:00
bors[bot]
8935106b39
Merge #7321
7321: Support runnables in macros r=matklad a=edwin0cheng

fixes  #4771

Co-authored-by: Edwin Cheng <edwin0cheng@gmail.com>
2021-01-19 09:27:45 +00:00
Edwin Cheng
8b03b58ad7 Support runnables in macros 2021-01-19 16:58:11 +08:00
Lukas Wirth
e31420fbe2 Remove obsolete RangeInfo usage in references 2021-01-18 21:10:01 +01:00
bors[bot]
342bf41022
Merge #7297 #7338
7297: Propose trait associated items and autoimport traits on completion r=matklad a=SomeoneToIgnore

![trait_imports](https://user-images.githubusercontent.com/2690773/104819998-6faeb480-583a-11eb-8b45-b7351b51b90e.gif)

Closes #7248

7338: Parse `impl const Trait` r=Veykril a=Veykril

Closes #7313

bors r+

Co-authored-by: Kirill Bulatov <mail4score@gmail.com>
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-01-18 19:40:11 +00:00
Lukas Wirth
21a6384ce6 Remove obsolete RangeInfo usage in rename 2021-01-18 20:28:20 +01:00
bors[bot]
39282ec419
Merge #7332
7332: Rename reference search uses ide_db::search directly r=matklad a=Veykril

https://github.com/rust-analyzer/rust-analyzer/pull/7251#discussion_r556644241

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-01-18 19:00:04 +00:00
Lukas Wirth
6015a66cae Make rename reference search use ide_db::search directly 2021-01-18 18:57:59 +01:00
Lukas Wirth
22b9b9abe7 Add test for reference search on self declaration param 2021-01-18 18:21:40 +01:00
bors[bot]
9daba961f2
Merge #7291
7291: Wrap remaining self/super/crate in Name{Ref} r=matklad a=Veykril

That should be the remaining special casing for `self` 🎉 

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-01-18 16:13:06 +00:00