bors
4ef6a49b44
Auto merge of #16702 - Veykril:intra-doc-links-generic, r=Veykril
...
fix: Ignore generic arguments in intra doc link path resolution
Fixes https://github.com/rust-lang/rust-analyzer/issues/16699
2024-03-02 09:51:16 +00:00
Lukas Wirth
aabaa47bfb
fix: Don't highlight related assoc items of super traits
2024-03-01 14:03:12 +01:00
bors
b3b9b53df8
Auto merge of #16706 - Veykril:load-cargo-ide-db, r=Veykril
...
internal: Remove load-cargo dependency on ide
This lightens up the dep tree for projects using r-a as a library that do not need the ide crate itself.
2024-02-29 14:59:27 +00:00
Lukas Wirth
4ee0dbdc04
internal: Remove load-cargo dependency on ide
2024-02-28 16:59:04 +01:00
Shoyu Vanilla
83f6dd14f8
Add a new failing test for Goto index_mut definition
2024-02-29 00:52:30 +09:00
Lukas Wirth
ab533d887d
fix: Ignore generic arguments in intra doc link path resolution
2024-02-28 14:47:47 +01:00
Shoyu Vanilla
d1bdebf2b9
Add a new failing test for goto deref_mut
2024-02-27 23:54:05 +09:00
Lukas Wirth
91554e0ae7
fix: Fix modules in blocks not resolving in ide layer
2024-02-26 14:54:47 +01:00
bors
c8887241f9
Auto merge of #16606 - Veykril:hover-extern, r=Veykril
...
internal: Render assoc item owner in hover for items other than functions
Closes https://github.com/rust-lang/rust-analyzer/issues/16603
2024-02-20 13:51:47 +00:00
Lukas Wirth
85203d9721
Render assoc item owner in hover for items other than functions
2024-02-20 13:16:12 +01:00
Lukas Wirth
d93096ecc0
internal: Fetch toolchain and datalayout for DetachedFiles
2024-02-20 10:40:39 +01:00
Lukas Wirth
a822291a02
Infallible definition hovers
2024-02-19 18:16:02 +01:00
UserIsntAvailable
6dd5dc10ef
test: fix disallow_renaming_for_non_local_definition
to follow PR changes.
2024-02-19 12:38:00 +01:00
UserIsntAvailable
6e16edb3bf
feat: append as <name>
when renaming inside an "UseTree".
...
test: include `rename_path_inside_use_tree`.
Keeps tracks the progress of the changes. 3 other tests broke with the changes
of this.
feat: rename all other usages within the current file.
feat: fix most of the implementation problems.
test: `rename_path_inside_use_tree` tests a more complicated scenario.
2024-02-19 12:24:36 +01:00
Lukas Wirth
ead369117a
CrateOrigin::Local means local to the project workspace, not cargo workspace
2024-02-16 16:28:17 +01:00
Lukas Wirth
b1404d387a
fix: Split toolchain and datalayout out of CrateData
2024-02-16 14:48:25 +01:00
Wilfred Hughes
dda641c62c
Set documentation field in SCIP from doc comment
...
Previously, the documentation field was the same as the text shown to
users when they hover over that symbol. The documentation should
really just be the doc comment, and as of #16179 the signature is
already stored in the signatureDocumentation field.
2024-02-14 14:46:32 -08:00
Lukas Wirth
1e6cef94df
fix: Fix build scripts not being rebuilt in some occasions
2024-02-14 15:20:45 +01:00
Chengxu Bian
ca64359945
remove eprintln! overwrite
2024-02-12 23:54:32 -05:00
Tavo Annus
125791386d
Cleanup term search related changes
2024-02-11 14:35:54 +02:00
bors
1ef7a2329b
Auto merge of #16525 - Veykril:item-loc, r=Veykril
...
Abstract more over ItemTreeLoc-like structs
Allows reducing some code duplication by using functions generic over said structs. The diff isn't negative due to me adding some additional impls for completeness.
2024-02-10 10:47:37 +00:00
Lukas Wirth
2ebf0c87c2
Deduplicate some code
2024-02-10 01:51:22 +01:00
Tetsuharu Ohzeki
8c2f301a41
ide: Fix warnings about clippy str_to_string
rule
2024-02-10 01:00:40 +09:00
Tetsuharu Ohzeki
adddd14afb
ide: Fix cargo test -p ide --doc
2024-02-10 00:14:17 +09:00
Tetsuharu Ohzeki
a3e60e7f7a
clippy: Enable needless_doctest_main
rule
2024-02-10 00:14:17 +09:00
Lukas Wirth
ddddc9c0e2
Update test outputs
2024-02-08 14:57:21 +01:00
Lukas Wirth
81ea48a573
fix: Fix tuple structs not rendering visibility in their fields
2024-02-08 10:05:28 +01:00
bors
66cec4d11a
Auto merge of #16470 - Veykril:clippy-disallow, r=lnicola
...
internal: Lint debug prints and disallowed types with clippy
2024-02-05 17:20:43 +00:00
bors
8f6a72871e
Auto merge of #16469 - Young-Flash:ci_typos, r=lnicola
...
internal: add typos check CI (part 2)
follow up https://github.com/rust-lang/rust-analyzer/pull/16448
2024-02-02 12:02:48 +00:00
Young-Flash
ba2910a3a7
minor: correct some typos
2024-02-02 18:22:54 +08:00
Lukas Wirth
9e8a0fae0c
Lint debug prints and disallowed types with clippy
2024-02-01 17:57:27 +01:00
Johann Hemmann
04ccef80cb
field_reassign_with_default
2024-01-31 19:06:18 +01:00
bors
355c9444e1
Auto merge of #16448 - Young-Flash:typos, r=lnicola
...
minor: correct typos
I use [crate-ci/typos](https://github.com/crate-ci/typos ) to check typos in codebase, if it's ok with you, I'd like to add a typo check CI using [typos](https://github.com/crate-ci/typos ) (with Apache-2.0, MIT licenses).
BTW, we can add a [_typos.toml](https://github.com/crate-ci/typos/blob/master/docs/reference.md ) as white list for some intentional typos
2024-01-31 13:29:55 +00:00
bors
2661c272c9
Auto merge of #16461 - Veykril:expansion-info, r=Veykril
...
internal: Remove unnecessary usages of ExpansionInfo
And some follow up simplifications to https://github.com/rust-lang/rust-analyzer/pull/16439
2024-01-31 08:58:55 +00:00
Lukas Wirth
d252247ab7
internal: Remove unnecessary usages of ExpansionInfo
2024-01-31 09:57:17 +01:00
bors
e4146af294
Auto merge of #16441 - Young-Flash:exclude_tests_refs, r=Veykril
...
feat: enable excluding refs search results in test
## Change
Here I introduce a new `ReferenceCategory::Test` type to indicate whether the function where this reference is located is marked as `#[test]`, and expose an config item (`rust-analyzer.references.excludeTests`) to client.
I also changed the signature of `ReferenceCategory::new`, adding a `sema: &Semantics<'_, RootDatabase>` param to do some hir analysis. Hope the current implementation is good to go.
## Demo
`"rust-analyzer.references.excludeTests": false`
![include](https://github.com/rust-lang/rust-analyzer/assets/71162630/9f1176d4-7b41-4f49-ac79-55d25a42d5d1 )
`"rust-analyzer.references.excludeTests": true`
![exclude](https://github.com/rust-lang/rust-analyzer/assets/71162630/2938b44b-9e5b-48de-a049-453f5bbc09d0 )
close https://github.com/rust-lang/rust-analyzer/issues/14530
2024-01-31 07:53:28 +00:00
David Barsky
e1ea7c8844
internal: switch to tracing
from log
...
This commit also adds `tracing` to NotificationDispatcher/RequestDispatcher,
bumps `rust-analyzer-salsa` to 0.17.0-pre.6, `always-assert` to 0.2, and
removes the homegrown `hprof` implementation in favor of a vendored
tracing-span-tree.
2024-01-30 12:27:31 -05:00
Young-Flash
db9fd370ee
minor: correct typos
2024-01-30 21:43:43 +08:00
bors
11b401d0b4
Auto merge of #16447 - Veykril:mir-errors, r=Veykril
...
intenral: Cleanup error variants in MIR code a bit
2024-01-30 11:38:41 +00:00
bors
22b6f9679d
Auto merge of #16439 - wasd96040501:feat/gotodef3, r=Veykril
...
feat: Support for GOTO def from *inside* files included with include! macro
close #14937
Try to implement goto def from *inside* files included with include! macro.
This implementation has two limitations:
1. Only **one** file which calls include! will be tracked. (I think multiple file be included is a rare case and we may let it go for now)
2. Mapping token from included file to macro call file (semantics.rs:646~658) works fine but I am not sure is this the correct way to implement.
2024-01-30 11:27:18 +00:00
Lukas Wirth
5860763f18
Cleanup error variants in MIR code slightly
2024-01-30 09:53:39 +01:00
Young-Flash
2b71acac4f
test: add full path ref exclude test case
2024-01-29 18:47:58 +08:00
Young-Flash
1bd21e98c0
test: add test for excluding refs
2024-01-28 18:39:42 +08:00
Young-Flash
6f303f49fe
feat: enable excluding refs search results in test
2024-01-28 18:28:13 +08:00
YangzeLuo
b22e772cab
feat: Support for GOTO def from *inside* files included with include! macro
2024-01-27 23:36:01 +08:00
Lukas Wirth
8a5829cf28
Re-order mod declarations
2024-01-27 11:02:34 +01:00
Waqar Ahmed
231f730e87
internal: Make TryToNav trait public
...
Currently there is no proper way to get a target FileRange for a given
Definition.
2024-01-22 15:20:58 +05:00
Johann Hemmann
b1a0c9ac40
single_match
2024-01-19 18:31:15 +01:00
Johann Hemmann
159b4c9fe9
search_is_some
2024-01-19 17:52:55 +01:00
Johann Hemmann
71d4dba960
redundant_pattern_matching
2024-01-19 17:31:01 +01:00