David Barsky
5ba37f3f8e
chore: fix a few spans without .entered()
2024-04-17 12:44:49 -04:00
Lukas Wirth
531a270d91
Generally optimize diagnostics performance
2024-04-15 22:15:41 +02:00
Lukas Wirth
94e38261b3
Optimize exhaustiveness checking perf a bit
2024-04-15 19:35:48 +02:00
Nadrieril
7e8f2d8fd3
Use contiguous indices for enum variants
2024-04-01 12:27:16 +02:00
Nadrieril
040f37a99d
Avoid hanging on complex matches
2024-03-18 21:21:52 +01:00
Nadrieril
e67adf40c9
Don't assume place validity when we don't know
2024-03-18 21:21:52 +01:00
Nadrieril
3cfcd4ed96
Abstract over the uses of compute_match_usefulness
2024-03-18 21:21:52 +01:00
Nadrieril
b99618c191
Bump dependencies
2024-03-17 14:11:44 +01:00
Laurențiu Nicola
cd2347e132
Skip match diagnostics for partially unknown types
2024-03-07 19:11:23 +02:00
Nadrieril
1b0b4220fd
Update rustc_pattern_analysis
to 0.42.0
2024-03-07 16:33:31 +01:00
Lukas Wirth
8844640c6f
fix: Put style lints behind disabled-by-default config
2024-03-05 11:43:23 +01:00
Young-Flash
7a58a23f16
internal: format code
2024-02-26 19:10:50 +08:00
Young-Flash
fd0cddf655
internal: move strip_references into dyn trait check
2024-02-26 18:57:46 +08:00
Young-Flash
b132190a9c
make clippy happy
2024-02-23 21:18:24 +08:00
Young-Flash
4220f90edf
fix: replace_filter_map_next_with_find_map shouldn't work for dyn trait
2024-02-23 21:05:55 +08:00
Lukas Wirth
d93096ecc0
internal: Fetch toolchain and datalayout for DetachedFiles
2024-02-20 10:40:39 +01:00
davidsemakula
f2218e7278
refactor: remove body parameter for "unnecessary else" diagnostic
2024-02-19 15:35:47 +03:00
davidsemakula
ff70310086
fix: only emit "unnecessary else" diagnostic for expr stmts
2024-02-19 15:24:45 +03:00
Shoyu Vanilla
21f4ff0351
Check for let expr ancestors instead of tail expr
2024-02-19 15:24:45 +03:00
Shoyu Vanilla
d14b22863b
Handle cases for else if
2024-02-19 15:19:27 +03:00
Shoyu Vanilla
e9c80a9c25
fix: False positive diagnostic for necessary else
2024-02-19 15:19:27 +03:00
Rose Hudson
5390e4ce9b
feat: add non-exhaustive-let diagnostic
2024-02-19 12:36:30 +01:00
Rose Hudson
69c25327f4
internal: reduce body lookups in expr diagnostics
2024-02-19 12:34:06 +01:00
Nadrieril
43caf8323a
Prefer debug!
to never!
and add regression test
2024-02-11 23:46:05 +01:00
Nadrieril
b04e0df1ce
pattern_analysis
doesn't need an arena anymore
2024-02-11 22:30:14 +01:00
Nadrieril
3356ebd255
Update to latest rustc_pattern_analysis
2024-02-11 22:30:14 +01:00
davidsemakula
98e6f43a2f
remove trailing return in trailing match expression
2024-02-08 19:32:53 +03:00
davidsemakula
cad222ff1b
remove trailing return in trailing if 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
545382db25
Fix warnings
2024-02-08 14:54:52 +01:00
davidsemakula
62cc4f9c46
add unnecessary else diagnostic
2024-02-06 19:00:10 +03:00
Nadrieril
d2d4119d24
Don't need an arena for types anymore
2024-02-06 05:09:30 +01:00
Nadrieril
ba7b12e062
Update rustc_pattern_analysis dependency
2024-02-06 05:08:19 +01:00
Nadrieril
c2d21242aa
Tweak variant_id_for_adt
2024-02-06 05:01:05 +01:00
davidsemakula
b45ee82811
incorrect case diagnostics for param names of trait impl assoc functions
2024-02-05 01:31:28 +03:00
davidsemakula
d761d86f03
refactor hir-ty::diagnostics::decl_check
for enum variants
2024-02-03 17:36:11 +03:00
davidsemakula
8e29104178
refactor hir-ty::diagnostics::decl_check
for struct fields
2024-02-03 17:33:25 +03:00
davidsemakula
23aa872f3c
refactor hir-ty::diagnostics::decl_check
for function bodies
2024-02-03 16:40:55 +03:00
davidsemakula
c0071ace5a
refactor hir-ty::diagnostics::decl_check
2024-02-03 15:51:14 +03:00
davidsemakula
080d223dd4
incorrect case diagnostics for type aliases
2024-02-02 17:07:08 +03:00
davidsemakula
0ffc088439
no incorrect case diagnostics for trait impl assoc functions and consts except for pats in fn bodies
2024-02-02 17:07:08 +03:00
davidsemakula
5fe3b75677
incorrect case diagnostics for trait name
2024-02-02 17:07:08 +03:00
David Barsky
251b14f2c5
internal: don't panic in debug_pat
2024-01-31 13:00:30 -05: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
Nadrieril
2370b70f25
Replace local copy of exhaustiveness checking with upstream librarified version
2024-01-23 15:54:00 +01:00
r0cky
1a9ef233b7
Remove unused codes
2024-01-21 12:56:23 +08:00
Johann Hemmann
b1a0c9ac40
single_match
2024-01-19 18:31:15 +01:00