Lukas Wirth
2ebf0c87c2
Deduplicate some code
2024-02-10 01:51:22 +01: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
Johann Hemmann
eb7aec5a8e
map_clone
2024-01-19 17:31:01 +01:00
Johann Hemmann
c629ec7611
clone_on_copy
2024-01-19 17:31:01 +01:00
Johann Hemmann
6a2a603a8c
let_and_return
2024-01-19 17:31:00 +01:00
Johann Hemmann
d8ad4afce8
manual_map
2024-01-19 17:31:00 +01:00
Johann Hemmann
3409645c3f
bind_instead_of_map
2024-01-19 17:31:00 +01:00
Lukas Wirth
83591268ab
minor: Make use of some new SmolStr
improvements
2024-01-17 13:47:15 +01:00
Lukas Wirth
82e8355492
feat: Show notable trait impls on hover
2024-01-16 19:17:33 +01:00
Lukas Wirth
384488c157
feat: Hover for literals showing additional value information
2024-01-16 14:28:47 +01:00
Lukas Wirth
8f4f5a6cce
fix: Make value_ty query fallible
2024-01-16 12:09:40 +01:00
Lukas Wirth
54f2111f69
internal: Make data queries transparent over their diagnostics variant
2024-01-16 10:47:54 +01:00
bors
5df53c9612
Auto merge of #16351 - Veykril:eager-enum-variant, r=Veykril
...
internal: Eagerly lower enum variants in CrateDefMap construction
2024-01-16 08:39:13 +00:00
Moritz Hedtke
fe35447617
fix: rename generator to coroutine also in dependencies
...
Follow the rename in nightly (see https://blog.rust-lang.org/inside-rust/2023/10/23/coroutines.html )
2024-01-15 12:24:48 +01:00
Lukas Wirth
180e9b2bbf
Cleanup
2024-01-15 12:22:51 +01:00