Aleksey Kladov
46b4f89c92
.
2021-01-20 01:56:11 +03:00
Lukas Wirth
98718e0544
Wrap remaining self/super/crate in Name{Ref}
2021-01-15 22:18:43 +01:00
Lukas Wirth
cb863390f2
Handle self/super/crate in PathSegment as NameRef
2021-01-15 19:21:23 +01:00
Lukas Wirth
b795128dde
Use hir::GenericParam in ide_db::Definition instead of relisting all 3
2021-01-10 12:33:47 +01:00
Nick Spain
40cd6cdf67
Fix ConstParam HasSource impl and implement TryToNav not Nav
2021-01-02 22:11:25 +11:00
Nick Spain
3f1b3df65b
Move impls of ToNav that use source() to TryToNav
2021-01-02 21:53:52 +11:00
Nick Spain
14d0db0759
HasSource::source_old -> HasSource::source for places where proc-macros were special cased
...
In #6901 some special case handling for proc-macros was introduced to
prevent panicing as they have no AST. Now the new HasSource::source
method is used that returns an option.
Generally this was a pretty trivial change, the only thing of much
interest is that `hir::MacroDef` now implements `TryToNav` not `ToNav`
as this allows us to handle `HasSource::source` now returning an option.
2021-01-02 21:53:52 +11:00
Nick Spain
ea4708c444
Mark HasSource::source_old as deprecated but allow at all call sites
2021-01-02 21:53:51 +11:00
Nick Spain
27cadcd531
HasSource::source -> HasSource::source_old
...
To start migrating HasSource::source to return an Option.
2021-01-02 21:53:51 +11:00
Lukas Wirth
18bf2e5af5
Add ConstParams to the ide layer
2021-01-01 14:43:16 +01:00
Lukas Wirth
42e3f97c30
Support labels in reference search
2020-12-24 15:40:18 +01:00
Aleksey Kladov
f6ed16674c
Align code_model name with ungrammar
2020-12-20 10:05:24 +03:00
Aleksey Kladov
c45221907a
Deduplicate highlight tags and symbol kinds
...
Curiously, LSP uses different enums for those, and unsurprising and
annoyingly, there are things which exist in one but not in the other.
Let's not repeat the mistake and unify the two things
2020-12-18 23:04:26 +03:00
Aleksey Kladov
ade2f5cd12
Reduce test verbosity
2020-12-18 21:26:47 +03:00
Aleksey Kladov
0e3581e823
NavTarget doesn't assume that it points to a symbol
2020-12-18 21:15:48 +03:00
Aleksey Kladov
55ba353b39
Don't expose SyntaxKind from IDE API
...
SyntaxKind is somewhat of an internal type, but IDE is using it to
basically specify an icon. Let's have a dedicated entity for this
instead.
2020-12-18 19:28:48 +03:00
bors[bot]
f4929fa9cc
Merge #6901
...
6901: Temp fixes panic caused by no ast for proc-macro r=maklad a=edwin0cheng
There are some panic when hover/goto definition for proc-macro. It is because in current design, we don't have `ast-node` for proc-macro and then it trigger [this](479d1f7eec/crates/hir/src/has_source.rs (L116) ) line to panic.
This PR is a temp fix for all of these similar to bd4c352831/crates/completion/src/render/macro_.rs (L42)
Co-authored-by: Edwin Cheng <edwin0cheng@gmail.com >
2020-12-18 02:30:51 +00:00
Edwin Cheng
60a3785ac2
Temp fixes panic caused by no ast for proc-macro
2020-12-18 10:26:17 +08:00
Aleksey Kladov
c888f1de6f
Rewrite doctest runnables
...
Handle more cases in a generic way without copy-pasting code.
2020-12-17 20:11:40 +03:00
Jonas Schievink
9231821c03
Make Attrs::from_attrs_owner private
2020-12-17 15:45:26 +01:00
Aleksey Kladov
2ae31e34b1
Rename ImplDef -> Impl
...
We used to have `Def` suffix for all symbols, but we moved off from
that. `FunctionDef` isn't better than `Function`. Looks like we've
forgot to change `Impl` though!
2020-12-17 14:36:15 +03:00
Lukas Wirth
55faa2daa3
Lifetime reference search
2020-12-16 22:21:01 +01:00
Lukas Wirth
8ed8e4f25a
Use Attrs::docs in NavigationTarget instead of DocCommentsOwner
2020-12-11 21:19:58 +01:00
Jonas Schievink
4943ef085d
Make original_range a method on InFile<&SyntaxNode>
2020-12-08 19:01:27 +01:00
Igor Aleksanov
19cce08662
Re-export base_db from ide_db
2020-10-24 11:39:57 +03:00
Aleksey Kladov
b06259673f
rename mock_analysis -> fixture
2020-10-02 17:49:44 +02:00
Aleksey Kladov
09348b2474
Get rid of MockAnalysis
2020-10-02 17:31:20 +02:00
Aleksey Kladov
b0fd3faf36
Switch to expect_test from crates.io
2020-08-21 13:19:31 +02:00
Aleksey Kladov
1b0c7701cc
Rename ra_ide -> ide
2020-08-13 17:58:27 +02:00