955 Commits

Author SHA1 Message Date
Lukas Wirth
bd002fe65c
Merge pull request #19982 from Veykril/push-uptnmqtlylsx
Simplify and optimize `ItemTree`
2025-06-13 11:16:24 +00:00
Lukas Wirth
23712aea06 cargo upgrade 2025-06-13 10:08:20 +02:00
Lukas Wirth
17d848a1bb Fix tests 2025-06-12 14:01:46 +02:00
Chayim Refael Friedman
ed0b4506dd Avoid referring to the item tree except in the def map
Item tree IDs are very unstable (adding an item of a kind invalidates all following items of the same kind). Instead use ast ids, which, since the previous commit, are pretty stable.
2025-06-12 08:50:40 +03:00
David Barsky
210c71eac5 hir-ty: test (the absence of) incremental trait solving 2025-06-11 12:12:58 -04:00
Chayim Refael Friedman
6f4a6d4349 Do not error at impls for unsized types that do not include where Self: Sized items 2025-06-10 14:04:21 +03:00
David Barsky
98f32c1de1 hir-ty: add incremental tests checking for infer invalidation 2025-06-03 13:48:45 -04:00
Lukas Wirth
cf969d21c3
Merge pull request #19869 from MatrixFrog/publicize_field
Add a quickfix for accessing a private field of a struct
2025-06-03 06:11:28 +00:00
Tyler Breisacher
4055436776 Add a quickfix for accessing a private field of a struct 2025-06-02 22:45:34 -07:00
Shoyu Vanilla
fefe86732d fix: Cycle handlers for `HirDatabase::infer, const_param_ty_with_diagnostics 2025-06-03 10:39:38 +09:00
Lukas Wirth
26f4af0350
Merge pull request #19872 from ChayimFriedman2/async-fn-output
fix: Fix inference of `AsyncFnX` return type
2025-05-28 08:39:14 +00:00
Shoyu Vanilla
8682c1b9b4 fix: Skip pattern analysis on type mismatches 2025-05-28 08:11:14 +09:00
Chayim Refael Friedman
2a7f18bbda Fix inference of AsyncFnX return type 2025-05-27 06:44:50 +03:00
Lukas Wirth
d146d3bc90
Merge pull request #19851 from ChayimFriedman2/normalize-exhaustiveness
fix: Normalize when checking for uninhabited types for pattern exhaustiveness checking
2025-05-26 07:19:12 +00:00
Lukas Wirth
cbff4ae151 Bump salsa 2025-05-23 12:58:00 +02:00
Chayim Refael Friedman
f17bbfc48b Normalize when checking for uninhabited types for pattern exhaustiveness checking 2025-05-23 01:01:21 +03:00
Lukas Wirth
68e03ee1e5
Merge pull request #19842 from Veykril/push-zunlmrzpnrzk
minor: Support `transmute_unchecked` intrinsic for mir-eval
2025-05-22 06:05:35 +00:00
Lukas Wirth
fce18a5708 Support transmute_unchecked intrinsic for mir-eval 2025-05-22 07:55:06 +02:00
Laurențiu Nicola
9e86544698 Merge from rust-lang/rust 2025-05-20 10:01:00 +03:00
Chayim Refael Friedman
5ed11234cc Improve asm support
Including:

 - Infer `label {}` and `const` operands.
 - Correctly handle unsafe check inside `label {}`.
 - Fix an embarrassing parser typo that cause labels to never be part of the AST
2025-05-15 23:36:00 +03:00
dianne
eb446f92fd add stubbed-out cases for rust-analyzer
rust-analyzer doesn't construct `DerefPattern(_)` constructors, so these
shouldn't crash. It looks like this is how slice patterns are
implemented too.
2025-05-06 18:53:55 -07:00
Chayim Refael Friedman
3b3e89240d Don't panic on some weird code 2025-05-06 10:54:35 +03:00
Lukas Wirth
581646236e refactor: De-arc defmap queries 2025-05-05 09:04:52 +02:00
Lukas Wirth
9a62507f2e Fix incorrect handling of unresolved non-module imports in name resolution 2025-05-05 08:29:34 +02:00
Lukas Wirth
7d51ec376a Disable fixpoint for variance computation temporarily 2025-05-04 06:09:34 +02:00
Lukas Wirth
6f9c62dfec
Merge pull request #19733 from ShoyuVanilla/issue-19724
fix: Implement mut to const ptr cast for method resolution
2025-05-02 20:48:24 +00:00
Shoyu Vanilla
4aa98bf1d7 fix: Implement mut to const ptr cast for method resolution 2025-05-03 03:01:40 +09:00
Shoyu Vanilla
9f60884db7 fix: Correct assoc ty bound var starting index 2025-05-03 00:31:33 +09:00
Lukas Wirth
235d88bf42 Render more lifetimes 2025-05-02 14:36:18 +02:00
Matthias Krüger
573c47c9ba remove a couple of clones 2025-05-01 11:41:42 +02:00
Lukas Wirth
1ad31eff67
Merge pull request #19247 from alibektas/19172_very_new
fix: Correct span info for mir::Operand
2025-04-30 10:13:02 +00:00
Lukas Wirth
996d6ed1a3 Split out salsa_macros
Does not do much yet due to tracing pulling syn but oh well
2025-04-29 19:43:36 +02:00
Lukas Wirth
6355df9c57 refactor: De-arc lang item queries 2025-04-28 17:17:39 +02: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
1fe060719a 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
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
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
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
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
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