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
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 LifetimeRef
s
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
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
d16b862ea5
fix: Support unstable UnsafePinned
struct in type layout calc
2025-04-21 09:35:30 +02:00
Chayim Refael Friedman
0f325c7ff8
Remove unnecessary predefined symbol clones
...
Now that they're const it's no longer needed.
Nothing manual was performed: only a regexp search of `sym::([\w][\w\d]*)\.clone\(\)` and replace by `sym::$1`.
2025-04-21 03:10:13 +03:00
Chayim Refael Friedman
9477e46bec
Get rid of static predefined symbols
...
Make them all `const`.
2025-04-21 03:07:35 +03:00
jackh726
6daa791fab
Update chalk
2025-04-20 16:20:08 +00:00
Chayim Refael Friedman
c58ddafe90
Make HirFileId
, EditionedFileId
and macro files Salsa struct
...
And make more queries non-interned.
Also flip the default for queries, now the default is to not intern and to intern a query you need to say `invoke_interned`.
2025-04-19 22:10:52 +03:00
Lukas Wirth
32052e5054
Merge pull request #19616 from ChayimFriedman2/transparent-diags
...
internal: Make hir-ty non-diagnostic queries transparent
2025-04-18 08:53:53 +00:00
Chayim Refael Friedman
5e3a914dc2
Make hir-ty non-diagnostic queries transparent
...
That is, all queries that have a `with_diagnostic` variant.
Them being tracked was (maybe) needed before #19462 , because back then diagnostics could refer `AstId`s (for macro types), but now they are no longer needed.
2025-04-18 07:04:13 +03:00
Chayim Refael Friedman
e1962d2e22
Fix a bug with predicate lowering of associated items
...
The essence of the bug is that bounds on `impl Trait` got lowered with incorrect bound vars, as if we were lowering the parent.
2025-04-17 00:19:54 +03:00
Chayim Refael Friedman
cdc5ba30fc
Prevent panics when there is a cyclic dependency between closures
...
We didn't include them in the sorted closures list, therefore didn't analyze them, then failed to find them.
2025-04-14 07:12:51 +03:00
Florian Diebold
1bf840bb50
Merge pull request #19566 from flodiebold/push-vzpyzvpkwkyt
...
Fix dyn compatibility code bypassing callable_item_signature query
2025-04-10 15:11:34 +00:00
Florian Diebold
6e06115e6d
Fix dyn compatibility code bypassing callable_item_signature query
2025-04-10 16:56:17 +02:00
Lukas Wirth
8df812f14d
fix: Walk const block expressions for unsafety checking
2025-04-10 16:10:30 +02:00
Lukas Wirth
4fdc2507c6
fix: Fix invalid signature bitflags
2025-04-10 15:39:27 +02:00
Lukas Wirth
f880acd18c
Merge pull request #19461 from Hmikihiro/shadow_by_module
...
fix: shadow type by module
2025-04-10 12:20:14 +00:00
Chayim Refael Friedman
8a9a1e3345
Remove all upcasts!
...
It turns out there were a lot redundant too.
2025-04-10 11:08:38 +03:00
Hayashi Mikihiro
1b471ebfd5
TypeNs contain module
...
Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com>
2025-04-10 16:29:10 +09:00
Hayashi Mikihiro
a7dc60a2c4
return single option
...
Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com>
2025-04-10 16:29:10 +09:00
Hayashi Mikihiro
2854ad9a41
fix: shadow type by module
...
Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com>
2025-04-10 16:29:10 +09:00
Lukas Wirth
07212140db
refactor: Turn LifetimeRef
into an enum
...
This makes things more structured
2025-04-09 15:58:06 +02:00