Jake Heinz
a497e9a05e
mbe: fix token conversion for doc comments
2023-04-22 03:06:06 +00:00
Jonas Schievink
901c8a4259
Map tokens from include!
expansion to the included file
2023-04-13 17:41:24 +02:00
Ryo Yoshida
f8eac19b33
Support trait aliases in IDE where type support isn't needed
2023-03-04 00:24:08 +09:00
morine0122
aa877645a6
Fix resolving types when resolving HIR and add a related test
2023-02-26 21:50:39 +09:00
bvanjoi
9a15cc81b4
fix(ty): should query impls in nearest block
2023-01-10 10:28:17 +08:00
Yuri Astrakhan
e16c76e3c3
Inline all format arguments where possible
...
This makes code more readale and concise,
moving all format arguments like `format!("{}", foo)`
into the more compact `format!("{foo}")` form.
The change was automatically created with, so there are far less change
of an accidental typo.
```
cargo clippy --fix -- -A clippy::all -W clippy::uninlined_format_args
```
2022-12-24 14:36:10 -05:00
Ryo Yoshida
19306c070d
Fix tests that depended on loose visibility restriction
2022-11-11 20:31:46 +09:00
Ryo Yoshida
67f1d8fe2c
Test all generic args for trait when finding matching impl
2022-10-25 23:28:40 +09:00
DropDemBits
a69cccfc0e
Underline only the intra-doc link instead of the whole doc comment
2022-10-09 21:29:31 -04:00
Maybe Waffle
1c0ec9f0c8
Fix go-to-def for #[doc = include_str!("path")]
2022-10-07 09:04:41 +00:00
Maybe Waffle
a57ef6b0b1
Fix go-to-def for shadowed include*!
2022-10-06 06:16:39 +00:00
bors
1da9156b0d
Auto merge of #12982 - jridgewell:into_future, r=Veykril
...
Implement IntoFuture type inference
One of my projects is using [IntoFuture](https://doc.rust-lang.org/std/future/trait.IntoFuture.html ) to make our async code a little less verbose. However, rust-analyzer can't infer the output type of an await expression if the value uses `IntoFuture` to convert into another type. So we're getting `{unknown}` types everywhere since switching.
`foo.await` itself [desugars](e4417cf020/compiler/rustc_ast_lowering/src/expr.rs (L644-L658)
) into a `match into_future(foo) {}`, with every `Future` impl getting a [default](e4417cf020/library/core/src/future/into_future.rs (L131-L139)
) `IntoFuture` implementation. I'm not sure if we want to disable the old `future_trait` paths, since this only recently [stabilize](https://github.com/rust-lang/rust/pull/98718 ).
2022-08-18 07:37:47 +00:00
Justin Ridgewell
cebf95718c
Find IntoFuture::IntoFuture's poll method
2022-08-16 17:53:10 -04:00
KaDiWa
232176b46a
remove imports that are also in edition 2021's prelude
2022-08-09 01:16:32 +02:00
Lukas Wirth
d6e78b04d0
feat: Handle operators like their trait functions in the IDE
2022-08-05 14:16:36 +02:00
Amos Wenger
816f7fe12a
Run cargo fix --edition-idioms
2022-07-20 15:02:08 +02:00
bitgaoshu
dcb4837b2d
WellFormed -> Holds
2022-06-26 23:09:06 +08:00
bitgaoshu
408fa148b9
add test for item same name
2022-06-26 22:48:26 +08:00
bitgaoshu
6ecabe352a
functions resolve to impl
2022-06-24 19:11:35 +08:00
Florian Diebold
f410fdf6e3
Add two more tests
2022-06-23 14:49:05 +02:00
bitgaoshu
1ef5e14c2c
goto where trait method impl
2022-06-23 14:01:22 +02:00
Lukas Wirth
86576072ab
minor: Freshen up goto feature docs
2022-05-27 15:47:31 +02:00
Jonas Schievink
7e45915aa4
Resolve assoc. types of supertraits in the IDE layer
2022-05-09 17:30:49 +02:00
Lukas Wirth
1f1185dcbb
Specific proc-macro crate type for other test fixture where needed
2022-03-09 22:18:09 +01:00
Lukas Wirth
c0d6471143
fix: Recognize Self
as a proper keyword
2022-03-05 23:20:06 +01:00
Lukas Wirth
ddf7b70a0f
Fix cfg_attr invalidating derive identifier IDE functionality
2022-01-30 22:47:16 +01:00
Lukas Wirth
c5a9985fc5
Remove lossy Definition::from_token
/Definition::from_node
methods
2022-01-04 18:29:53 +01:00
Lukas Wirth
6b7b09d329
internal: Record unresolved derive invocations in hir
2022-01-02 23:44:23 +01:00
Lukas Wirth
54b2de45e1
Unnest ide::display::navigation_target module
2021-11-22 13:04:28 +01:00
Lukas Wirth
7776aad166
internal: Flatten Definition::ModuleDef
variant
2021-11-11 00:05:53 +01:00
Lukas Wirth
3018ffd85e
Refactor ide handling for paths in derive inputs
2021-10-28 16:47:19 +02:00
Milo
35e5daacc3
more clippy fixes
2021-10-16 12:32:55 +01:00
Mirko Rainer
eccfa1645b
Saw a FIXME comment and decided to fix it.
...
This renames `descend_into_macros` to `descend_into_macros_single` and `descend_into_macros_many` into `descend_into_macros`.
However, this does not touch a function in `SemanticsImpl` of same name.
2021-10-12 11:52:31 -04:00
k-nasa
b50cb5c261
Remove neesless clone
2021-10-10 10:50:51 +09:00
Lukas Wirth
22c6f0a8a5
Support goto_def for intra-doc-links in macro invocations
2021-09-23 19:17:29 +02:00
Lukas Wirth
42eb4efb5b
Cleanup
2021-09-23 16:28:03 +02:00
hamidreza kalbasi
589c1dfa04
move function to defs.rs
2021-09-22 18:35:54 +03:30
hamidreza kalbasi
18e6b508dd
remove dead code
2021-09-22 11:44:23 +03:30
hamidreza kalbasi
569ac5bee1
use find_definition in go to
2021-09-22 11:37:26 +03:30
Lukas Wirth
11a17c803f
Add multi-token mapping test for goto_definition
2021-09-18 12:00:12 +02:00
zhoufan
227450f9b9
do comment handling on the original token
2021-09-18 08:22:57 +08:00
zhoufan
ea3535cefc
fix: multi-token mapping aware goto definition
2021-09-16 09:44:22 +08:00
Lukas Wirth
bb946f78f6
fix: fix expansion order for fn-like macros and attributes in token descending
2021-09-14 01:20:43 +02:00
Lukas Wirth
3fab50019c
Simplify
2021-07-26 20:26:24 +02:00
Lukas Wirth
bfe0fa009e
Resolve derive attribute input macro paths in ide layer
2021-07-24 20:35:43 +02:00
Lukas Wirth
e8f1abf5f7
Correctly generate link fragments for associated items
2021-07-20 16:01:27 +02:00
Lukas Wirth
ab2647769c
Return both field and local references for shorthands in goto_def
2021-07-11 16:16:16 +02:00
Lukas Wirth
c41f1279a3
Inline name classification reference calls
2021-07-11 15:39:09 +02:00
Lukas Wirth
c65bb7f8b9
Explicitly check for reference locals or fields in Name classification
2021-07-11 15:04:40 +02:00
Aleksey Kladov
bbb053532e
internal: remove one more needless extern crate
2021-07-11 15:48:49 +03:00