Prajwal S N
c6ae7b3541
chore: rename unmerge_use to unmerge_imports
...
Signed-off-by: Prajwal S N <prajwalnadig21@gmail.com>
2025-04-28 17:32:05 +05:30
Prajwal S N
bb493649d2
fix: migrate unmerge_use to syntax editor
...
Also ensures that attributes on the use item are applied to the new use
item when unmerging.
Signed-off-by: Prajwal S N <prajwalnadig21@gmail.com>
2025-04-28 17:31:23 +05:30
Prajwal S N
2eb7389b63
refactor: migrate let_else_to_match to editor
...
Signed-off-by: Prajwal S N <prajwalnadig21@gmail.com>
2025-04-28 17:19:17 +05:30
Laurențiu Nicola
a058c340ef
Unelide lifetime
2025-04-28 14:16:43 +03:00
Lukas Wirth
5adee2ad2c
Merge pull request #19706 from Veykril/push-nkpmknlvzyom
...
fix: Address minor FIXME
2025-04-28 10:12:20 +00:00
Lukas Wirth
48fb00c19d
fix: Address minor FIXME
2025-04-28 11:55:26 +02:00
Lukas Wirth
0fee71065b
Merge pull request #19704 from Veykril/push-wrvznvvpvtvp
...
Add expression fill mode variant for filling with underscore expressions
2025-04-28 09:45:04 +00:00
Lukas Wirth
7e526b6be7
Add expression fill mode variant for filling with underscore expressions
2025-04-28 10:39:36 +02:00
Laurențiu Nicola
1f727edb2d
Format code
2025-04-28 11:11:47 +03:00
Laurențiu Nicola
6225bb9c44
Merge from rust-lang/rust
2025-04-28 11:06:53 +03:00
Chayim Refael Friedman
d8887c0758
Merge pull request #19692 from vishruth-thimmaiah/remove_underscore_for_used_var
...
feat: adds an assist to remove underscores from used variables
2025-04-26 19:00:49 +00:00
Vishruth-Thimmaiah
47c22bf916
feat: adds an assist to remove underscores from used variables
...
adds an assist that suggests removing any underscore prefixes from used
variables.
2025-04-27 00:13:42 +05:30
Chayim Refael Friedman
e6ebf0b8a1
Don't escape 'static
...
As it is a valid lifetime without escaping.
It does need to be escaped as a label, but we have no way to distinguish that.
2025-04-26 21:20:43 +03:00
Chayim Refael Friedman
d781d02cf4
Escape raw names in labels properly
2025-04-26 21:10:43 +03:00
Wilfred Hughes
eb23af9e73
Clarify text for add_braces assist
...
"to arm expression" is hard to parse, because "arm" can be a verb. Not
all Rust users may know that "arm" refers to a `match` expression
either.
Tweak the wording to make the sentence easier to parse, and clarify
that this assist refers to `match`. Use the same wording style for the
closure version too.
2025-04-25 22:15:22 -07:00
Chayim Refael Friedman
df594ba8f4
Merge pull request #19690 from ChayimFriedman2/preallocate-input
...
minor: Preallocate `parser::Input`
2025-04-25 14:35:49 +00:00
Chayim Refael Friedman
8bff414abc
Preallocate parser::Input
2025-04-25 17:18:14 +03:00
Lukas Wirth
71a3888d07
Merge pull request #19688 from ChayimFriedman2/less-unused
...
internal: More `shrink_to_fit()` and upgrade dashmap and hashbrown
2025-04-25 10:19:38 +00:00
Chayim Refael Friedman
f44e01e3d0
Switch AstIdMap to hashbrown::HashTable from the raw API
...
It's the intended use.
2025-04-25 12:57:13 +03:00
Chayim Refael Friedman
4d95ae52f8
Upgrade dashmap and hashbrown
...
And adapt `intern` to the changes in the API.
2025-04-25 12:47:26 +03:00
gohome001
1d4602e2b0
minor: format
2025-04-25 17:02:08 +08:00
gohome001
e525239877
test: add test case for highlight unsafe operations
2025-04-25 16:06:48 +08:00
gohome001
0d1743a890
feat: highlight unsafe operations
2025-04-25 16:06:48 +08:00
Chayim Refael Friedman
1fe060719a
shrink_to_fit() in more places
...
This saves 18mb on `analysis-stats .`, without regressing speed.
2025-04-25 10:55:12 +03:00
David Richey
0a3e0032e6
Always error when failed to parse DiscoverProjectMessage
2025-04-24 22:59:39 -05:00
Lukas Wirth
dd41cda70e
Merge pull request #19678 from Veykril/push-mkznvpsktnnz
...
Arena allocate `LifetimeRef`s
2025-04-24 12:56:22 +00:00
Lukas Wirth
5ff4ba347d
Merge pull request #19675 from Veykril/push-uuluymsosttr
...
fix: Fix type argument mismatch incorrectly triggering on inferred trait args
2025-04-24 08:45:30 +00:00
Lukas Wirth
61df8ec4b8
Arena allocate LifetimeRefs
2025-04-24 09:55:06 +02:00
Lukas Wirth
99a7e423e2
Shrink WherePredicate by 8 bytes
2025-04-24 09:23:00 +02:00
Chayim Refael Friedman
e9fc3b6f20
Correctly set infer_args = true in more places
...
Previously this being incorrect wasn't a problem, it just meant we put an error type that then changed to infer type, so exactly what rustc does at the end. But now there is a diagnostic.
2025-04-24 09:16:13 +02:00
Lukas Wirth
dce59ad8fb
fix: Fix type argument mismatch incorrectly triggering on inferred trait args
2025-04-24 09:16:01 +02:00
Lukas Wirth
4a2eaddc77
refactor: Remove WherePredicateTypeTarget
2025-04-24 09:13:56 +02:00
Chayim Refael Friedman
adcf699ea3
Properly handle lifetimes when checking generic arguments len
...
And also, prepare for correct lowering of lifetime. We still don't handle most lifetimes correctly, but a bit more of the foundation to lifetime elision is now implemented.
2025-04-24 08:35:20 +03:00
Lukas Wirth
d3b6d88386
fix: Fix incorrect diagnostic for lifetime parameter count mismatch
2025-04-23 16:36:13 +02:00
Lukas Wirth
35063ee389
Mark incorrect_generics_len diagnostic as experimental
2025-04-23 12:28:47 +02:00
Lukas Wirth
4e4aee41c9
Merge pull request #19647 from roife/fix-issue-19646
...
fix: panics in inlay hints that produce empty text edits for closure return types
2025-04-22 16:27:28 +00:00
roifewu
97fa2a73ea
fix: panics in inlay hints that produce empty text edits for closure return types
2025-04-23 00:01:35 +08:00
Lukas Wirth
1c68d83569
Merge pull request #19657 from ChayimFriedman2/better-offset-of
...
feat: Better support `offset_of!()`
2025-04-22 13:28:34 +00:00
Chayim Refael Friedman
6e4abf126e
Account for IngredientCache::get_or_create() taking &Zalsa and not &dyn Database
2025-04-22 15:20:07 +03:00
Chayim Refael Friedman
547c124c05
Fix variance
...
This one does need fixpoint.
2025-04-22 15:20:07 +03:00
Chayim Refael Friedman
57c019a3c5
Adapt for new cycle handling changing in Salsa
2025-04-22 15:20:05 +03:00
Chayim Refael Friedman
db72e2ff41
Adjust for salsa::Id::from_u32() being unsafe
...
This impacts our manual `salsa::Id` wrappers. I refactored them a bit to improve safety.
2025-04-22 15:19:35 +03:00
Chayim Refael Friedman
2bba385dda
Adjust for new Salsa not implementing Debug by default
2025-04-22 15:19:35 +03:00
Lukas Wirth
9632b386d1
Merge pull request #19479 from ChayimFriedman2/generic-mismatch
...
feat: Add two new diagnostics: one for mismatch in generic arguments count, and another for mismatch in their kind
2025-04-22 12:06:28 +00:00
Chayim Refael Friedman
7b8200ba8d
The new diagnostic has found a bug lurking in minicore
...
It's cute, isn't it?
2025-04-22 14:55:43 +03:00
Chayim Refael Friedman
99ce53b1d7
Add two new diagnostics: one for mismatch in generic arguments count, and another for mismatch in their kind
...
Also known as E0747 and E0107.
And by the way, rewrite how we lower generic arguments and deduplicate it between paths and method calls. The new version is taken almost straight from rustc.
This commit also changes the binders of `generic_defaults()`, to only include the binders of the arguments up to (and not including) the current argument. This make it easier to handle it in the rewritten lowering of generic args. It's also how rustc does it.
2025-04-22 14:55:43 +03:00
Lukas Wirth
669a30852b
Merge pull request #19622 from A4-Tacks/raw-string-suffix
...
Fix ide-assists raw_string suffix fail
2025-04-22 11:43:17 +00:00
Lukas Wirth
2b4b483af1
Merge pull request #19662 from Veykril/push-lqqvmnonlwrx
...
minor: Fix outdated comment in hir-ty/generics.rs
2025-04-22 11:26:56 +00:00
Lukas Wirth
a6b24f47c1
minor: Fix outdated comment in hir-ty/generics.rs
2025-04-22 13:15:56 +02:00
Lukas Wirth
9a9f4e7f63
Merge pull request #19624 from jackh726/chalk-update
...
Update chalk
2025-04-22 10:58:31 +00:00