Commit graph

284086 commits

Author SHA1 Message Date
Lukas Wirth
61ddcf06ba
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
31523ae54b 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
5dac463bda Upgrade dashmap and hashbrown
And adapt `intern` to the changes in the API.
2025-04-25 12:47:26 +03:00
Chayim Refael Friedman
42f6877333 shrink_to_fit() in more places
This saves 18mb on `analysis-stats .`, without regressing speed.
2025-04-25 10:55:12 +03:00
Lukas Wirth
40a3f84b67
Merge pull request #19684 from darichey/error-parse-discover
Always error when failed to parse DiscoverProjectMessage
2025-04-25 04:48:46 +00:00
David Richey
1993def51e Always error when failed to parse DiscoverProjectMessage 2025-04-24 22:59:39 -05:00
Lukas Wirth
00732c0936
Merge pull request #19678 from Veykril/push-mkznvpsktnnz
Arena allocate `LifetimeRef`s
2025-04-24 12:56:22 +00:00
Lukas Wirth
f801657241
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
1fbe9e3460 Arena allocate LifetimeRefs 2025-04-24 09:55:06 +02:00
Lukas Wirth
eed0fd4654
Merge pull request #19677 from Veykril/push-xkzwkrpypuqo
refactor: Remove `WherePredicateTypeTarget`
2025-04-24 07:33:57 +00:00
Lukas Wirth
d1deab56d1 Shrink WherePredicate by 8 bytes 2025-04-24 09:23:00 +02:00
Chayim Refael Friedman
de082127d8 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
cd064e764d fix: Fix type argument mismatch incorrectly triggering on inferred trait args 2025-04-24 09:16:01 +02:00
Lukas Wirth
c5ea5bf182 refactor: Remove WherePredicateTypeTarget 2025-04-24 09:13:56 +02:00
Lukas Wirth
c5968743d1
Merge pull request #19676 from ChayimFriedman2/lifetimes
feat: Properly handle lifetimes when checking generic arguments len
2025-04-24 06:13:55 +00:00
Chayim Refael Friedman
06afa11ec5 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
ebcb693fc8
Merge pull request #19672 from Veykril/push-tqooypklusty
fix: Fix incorrect diagnostic for lifetime parameter count mismatch
2025-04-23 14:47:40 +00:00
Lukas Wirth
084bd9fd1f fix: Fix incorrect diagnostic for lifetime parameter count mismatch 2025-04-23 16:36:13 +02:00
Lukas Wirth
8632b52721
Merge pull request #19670 from Veykril/push-owsrlsmlzttm
minor: Mark `incorrect_generics_len` diagnostic as experimental
2025-04-23 10:41:49 +00:00
Lukas Wirth
677505f1fa Mark incorrect_generics_len diagnostic as experimental 2025-04-23 12:28:47 +02:00
Lukas Wirth
521b8308c9
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
68c03725c9 fix: panics in inlay hints that produce empty text edits for closure return types 2025-04-23 00:01:35 +08:00
Lukas Wirth
b56765c735
Merge pull request #19657 from ChayimFriedman2/better-offset-of
feat: Better support `offset_of!()`
2025-04-22 13:28:34 +00:00
Lukas Wirth
7b249d24e7
Merge pull request #19661 from ChayimFriedman2/salsa-v20
internal: Upgrade to the next Salsa
2025-04-22 12:31:09 +00:00
Chayim Refael Friedman
a27da3141c Account for IngredientCache::get_or_create() taking &Zalsa and not &dyn Database 2025-04-22 15:20:07 +03:00
Chayim Refael Friedman
676f2121e6 Fix variance
This one does need fixpoint.
2025-04-22 15:20:07 +03:00
Chayim Refael Friedman
e2d14a2882 Adapt for new cycle handling changing in Salsa 2025-04-22 15:20:05 +03:00
Chayim Refael Friedman
f97d90f89e 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
f0fa096213 Adjust for new Salsa not implementing Debug by default 2025-04-22 15:19:35 +03:00
Chayim Refael Friedman
6f01c7f3d0 Depend on Salsa v0.20.0 2025-04-22 15:19:35 +03:00
Lukas Wirth
c4e8514de1
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
f16cefb606 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
5e49ce92fe 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
5db7548ad6
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
e51e384fb0
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
c1cad77ac6 minor: Fix outdated comment in hir-ty/generics.rs 2025-04-22 13:15:56 +02:00
Lukas Wirth
7735f18620
Merge pull request #19624 from jackh726/chalk-update
Update chalk
2025-04-22 10:58:31 +00:00
Chayim Refael Friedman
5c6f09810c Resolve offset_of!() in IDE 2025-04-22 00:33:06 +03:00
Lukas Wirth
4a5ec88596
Merge pull request #19655 from Veykril/push-kunlloxnyksr
refactor: Fold hygiene map into bindings themselves
2025-04-21 15:04:24 +00:00
Lukas Wirth
832f70fa1f refactor: Fold hygiene map into bindings themselves
`HygieneId` fits into `Binding`'s padding.
2025-04-21 16:53:06 +02:00
Lukas Wirth
b6eb883b1f
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
d7ddec67f2
Merge pull request #19604 from WtzLAS/fix-issue-19601
Add semicolon to use
2025-04-21 12:34:07 +00:00
Lukas Wirth
af324f248c
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
3fc93c0c27
Merge pull request #19643 from ChayimFriedman2/generic-const-items
feat: Parse generic consts
2025-04-21 12:17:08 +00:00
Lukas Wirth
3310726864
Merge pull request #19653 from Veykril/push-lmrprywtztzt
feat: parse `super let`
2025-04-21 11:58:36 +00:00
Lukas Wirth
ade6329dcd
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
7ff957818c
Merge pull request #19634 from Veykril/push-mnpmxxrprymo
feat: Allow unsetting env vars in `server.extraEnv` config
2025-04-21 11:48:41 +00:00
Lukas Wirth
fb5d3c36cd feat: parse super let 2025-04-21 13:47:42 +02:00
roifewu
d47fdc11fa minor: simplify and enhance notable traits rendering 2025-04-21 19:03:35 +08:00
Lukas Wirth
c8527c4dc9 feat: Allow unsetting env vars in server.extraEnv config 2025-04-21 10:38:54 +02:00