Laurențiu Nicola
a058c340ef
Unelide lifetime
2025-04-28 14:16:43 +03: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
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
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 LifetimeRef
s
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
Chayim Refael Friedman
8d824c7828
Resolve offset_of!()
in IDE
2025-04-22 00:33:06 +03:00
Lukas Wirth
cb6ddbedb0
refactor: Fold hygiene map into bindings themselves
...
`HygieneId` fits into `Binding`'s padding.
2025-04-21 16:53:06 +02:00
Lukas Wirth
34e7d60e30
Merge pull request #19644 from ChayimFriedman2/const-syms
...
internal: Make predefined symbols `const` instead of `static`
2025-04-21 12:34:59 +00:00
Lukas Wirth
a5540bd98d
Merge pull request #19604 from WtzLAS/fix-issue-19601
...
Add semicolon to use
2025-04-21 12:34:07 +00:00
Lukas Wirth
00887db152
Merge pull request #19629 from jyn514/unset-env
...
allow using `null` to unset an environment variable
2025-04-21 12:22:26 +00:00
Lukas Wirth
e3f7d18458
Merge pull request #19643 from ChayimFriedman2/generic-const-items
...
feat: Parse generic consts
2025-04-21 12:17:08 +00:00
Lukas Wirth
5195f9d176
Merge pull request #19653 from Veykril/push-lmrprywtztzt
...
feat: parse `super let`
2025-04-21 11:58:36 +00:00
Lukas Wirth
5004778384
Merge pull request #19651 from roife/enhance-notable-trait-render
...
minor: simplify and enhance notable traits rendering
2025-04-21 11:48:43 +00:00
Lukas Wirth
1b6948e88a
feat: parse super let
2025-04-21 13:47:42 +02:00
roifewu
06cf9ca521
minor: simplify and enhance notable traits rendering
2025-04-21 19:03:35 +08:00
Lukas Wirth
d16b862ea5
fix: Support unstable UnsafePinned
struct in type layout calc
2025-04-21 09:35:30 +02:00
Lukas Wirth
5680911972
fix: Fix completion_snippets_custom config always erroring
2025-04-21 08:18:11 +02:00