Ryo Yoshida
4940017716
Rename StructDatum
-> AdtDatum
2024-02-14 13:50:44 +01:00
Tavo Annus
125791386d
Cleanup term search related changes
2024-02-11 14:35:54 +02:00
Tavo Annus
88964c0b6a
Optionally disable term search for autocompletion
2024-02-11 13:33:29 +02:00
Tavo Annus
0b838e3e23
Expand target for autocompletion
2024-02-11 13:33:29 +02:00
Tavo Annus
a946970e2d
Add quantified trees to reduce autocomplete options
2024-02-11 13:33:29 +02:00
Tavo Annus
bdbdd83ec1
Initial version of term_search for autocomplete
2024-02-11 13:33:29 +02:00
Tavo Annus
627255dd5a
Add static method tactic
2024-02-11 13:33:29 +02:00
Tavo Annus
35eb0dbbc0
Add more documentation for term search
2024-02-11 13:33:29 +02:00
Tavo Annus
bb3c7cff60
Introduce term search to rust-analyzer
2024-02-11 13:33:29 +02:00
Lukas Wirth
5136705fad
internal: Remove SELF_REF hack for self referential SyntaxContexts
2024-02-10 16:20:02 +01: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
00303c3b67
Abstract over ItemTreeLoc
2024-02-10 11:37:59 +01:00
Lukas Wirth
2ebf0c87c2
Deduplicate some code
2024-02-10 01:51:22 +01:00
Tetsuharu Ohzeki
eba1b13295
hir: Fix warnings about clippy str_to_string
rule
2024-02-10 01:00:40 +09:00
Tetsuharu Ohzeki
7669619f9a
clippy: Enable self_named_constructors
rule
2024-02-09 22:31:21 +09:00
davidsemakula
602acfcb70
fix conflicting "unnecessary else" and "trailing return" diagnostics tests
2024-02-08 19:32:53 +03:00
davidsemakula
a250c2dde0
refactor remove trailing return diagnostic
2024-02-08 19:32:53 +03:00
davidsemakula
98e6f43a2f
remove trailing return in trailing match expression
2024-02-08 19:32:53 +03:00
davidsemakula
2987fac76f
diagnostic to remove trailing return
2024-02-08 19:32:53 +03:00
bors
0e5766b0d8
Auto merge of #16477 - davidsemakula:trait-incorrect-case-diagnostic, r=Veykril
...
feat: Add incorrect case diagnostics for traits and their associated items
Updates incorrect case diagnostic to:
- Check traits and their associated items
- Ignore trait implementations except for patterns in associated function bodies
Also cleans up `hir-ty::diagnostics::decl_check` a bit (mostly to make it a bit more DRY and easier to maintain)
Also fixes : #8675 and fixes : #8225
2024-02-08 14:40:16 +00:00
bors
e9d3565cd1
Auto merge of #16502 - davidsemakula:unnecessary-else-diagnostic, r=Veykril
...
feat: Add "unnecessary else" diagnostic and fix
Fixes #9457
2024-02-08 14:25:00 +00:00
Lukas Wirth
81ea48a573
fix: Fix tuple structs not rendering visibility in their fields
2024-02-08 10:05:28 +01:00
davidsemakula
62cc4f9c46
add unnecessary else diagnostic
2024-02-06 19:00:10 +03: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
3e47532dd4
Auto merge of #16474 - davidbarsky:david/import-on-the-fly-improvements, r=lnicola
...
internal: even more `tracing`
As part of profiling completions, I added some additional spans and moved `TyBuilder::subst_for_def` closer to its usage site (the latter had a small impact on completion performance. Thanks for the tip, Lukas!)
2024-02-05 09:01:58 +00:00
davidsemakula
080d223dd4
incorrect case diagnostics for type aliases
2024-02-02 17:07:08 +03:00
davidsemakula
6d2d6323ac
incorrect case diagnostics for trait assoc functions and consts
2024-02-02 17:07:08 +03:00
David Barsky
f9bef39d48
internal: add some more tracing
spans inside of hir-ty
2024-02-01 16:10:32 -05:00
Lukas Wirth
9e8a0fae0c
Lint debug prints and disallowed types with clippy
2024-02-01 17:57:27 +01:00
Johann Hemmann
b73ee2f50d
useless_conversion
2024-01-31 19:06:18 +01:00
Johann Hemmann
c4302eaa56
unnecessary_lazy_evaluations
2024-01-31 19:06:18 +01:00
Johann Hemmann
de6f9561f2
unnecessary_cast
2024-01-31 19:06:18 +01:00
Johann Hemmann
daa20725c5
toplevel_ref_arg
2024-01-31 19:06:18 +01:00
Lukas Wirth
d252247ab7
internal: Remove unnecessary usages of ExpansionInfo
2024-01-31 09:57:17 +01: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
Johann Hemmann
43b1ae0446
cargo clippy --fix
2024-01-30 14:50:21 +01: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
YangzeLuo
b22e772cab
feat: Support for GOTO def from *inside* files included with include! macro
2024-01-27 23:36:01 +08:00
Lukas Wirth
6cf7b5f8d7
Don't parse intra doc links as syntax trees
2024-01-26 20:00:47 +01:00
Lukas Wirth
5a343415e8
Add some size assertions
2024-01-26 19:28:39 +01:00
Johann Hemmann
71d4dba960
redundant_pattern_matching
2024-01-19 17:31:01 +01:00
Johann Hemmann
5a62a0db46
redundant_closure
2024-01-19 17:31:01 +01:00
Johann Hemmann
3cf1358eb8
question_mark
2024-01-19 17:31:01 +01:00
Johann Hemmann
692212bbdd
partialeq_to_none
2024-01-19 17:31:01 +01:00
Johann Hemmann
e58b683201
needless_return
2024-01-19 17:31:01 +01:00
Johann Hemmann
3839f9a9a2
needless_borrow
2024-01-19 17:31:01 +01:00
Johann Hemmann
add40c8660
match_like_matches_macro
2024-01-19 17:31:01 +01:00
Johann Hemmann
8982ff3bba
get_first
2024-01-19 17:31:01 +01:00