Lukas Wirth
3bf07a5f04
Simplify
2023-03-15 13:54:06 +01:00
Zachary S
af175ddcdc
Add test for async closure types.
...
(rebased onto 6dfd8ae
)
2023-03-15 13:10:35 +01:00
Zachary S
6746a08b44
fix: Fix return type of async closures.
...
(rebased onto 6dfd8ae
)
2023-03-15 13:10:00 +01:00
Lukas Wirth
510e4b4029
Simplify
2023-03-14 20:22:11 +01:00
Lukas Wirth
f34b2469bd
lint incoherent inherent impls
2023-03-14 19:20:44 +01:00
bors
6a98e961f8
Auto merge of #14340 - Veykril:expand, r=lnicola
...
internal: Rename AstDatabase to ExpandDatabase
2023-03-14 09:37:54 +00:00
hkalbasi
d7da9e64d1
Add storage dead for let bindings without initializer
2023-03-14 12:15:16 +03:30
Lukas Wirth
9fb9ee3b6a
internal: Rename AstDatabase to ExpandDatabase
2023-03-13 16:35:41 +01:00
Laurențiu Nicola
bdbd2a59b0
Merge branch 'master' into sync-from-rust
2023-03-13 10:21:53 +02:00
bors
70e10deee8
Auto merge of #14326 - iDawer:refactor, r=Veykril
...
internal: Rename `hir::diagnostics::MissingMatchArms.match_expr` field
`hir::diagnostics::MissingMatchArms.match_expr` had confusing name: it is pointing to scrutinee expression. Renamed to `scrutinee_expr` and used better fitting type for it.
Also small refactorings/cleanup.
2023-03-11 07:36:00 +00:00
iDawer
17b9d35b31
Refactor: Distinguish scrutinee expression from match expression
2023-03-10 18:43:50 +05:00
iDawer
8f189f62c6
Remove unnecessary argument
2023-03-10 16:35:04 +05:00
iDawer
c38aa5f4f0
Use anonymous lifetimes
2023-03-10 16:16:28 +05:00
hkalbasi
a980b562a7
Fix stack overflow when derefrencing &!
2023-03-10 13:44:34 +03:30
hkalbasi
71e1c025f8
Revert #14285
2023-03-10 11:57:30 +03:30
hkalbasi
8593132a43
fix block with no termination in or patterns
2023-03-09 22:32:12 +03:30
hkalbasi
cf47c15821
Evaluate consts in path_to_const
2023-03-08 16:42:20 +03:30
bors
ecc32c2f85
Auto merge of #14271 - Veykril:ty-diag-err, r=Veykril
...
Don't trigger unresolved method/field diagnostics on types containing errors
2023-03-07 14:25:20 +00:00
Lukas Wirth
d45708fabe
Don't trigger unresolved method/field diagnostics on types containing errors
2023-03-07 15:24:43 +01:00
hkalbasi
bcd7ecb242
Add profiling to mir lower and borrowck query
2023-03-07 12:42:52 +03:30
hkalbasi
af90ec8096
Partially support "overloaded deref" MIR lowering
2023-03-06 21:09:09 +03:30
hkalbasi
bf0f99f15d
Fix overloaded deref unused mut false positive
2023-03-06 21:09:09 +03:30
hkalbasi
6377d50bd1
Support "for loop" MIR lowering
2023-03-06 21:09:09 +03:30
hkalbasi
ac04bfd7a7
Add View Mir
command and fix some bugs
2023-03-06 21:09:09 +03:30
hkalbasi
a25710b0c0
Add need-mut
and unused-mut
diagnostics
2023-03-06 21:09:08 +03:30
hkalbasi
c0a0664d12
Support "or patterns" MIR lowering
2023-03-06 21:09:08 +03:30
hkalbasi
61ad6a96ad
Add BindingId
2023-03-06 21:09:08 +03:30
bors
a360fab9a3
Auto merge of #14261 - Veykril:ty-perf, r=Veykril
...
internal: Re-use the resolver in `InferenceContext` instead of rebuilding it whenever needed
This reduced inference time on my local build by roughly ~1 sec (out of like 60)
2023-03-06 10:54:27 +00:00
Lukas Wirth
d8b1ec6a25
Remove unnecessary option wrapping
2023-03-05 15:43:02 +01:00
Lukas Wirth
a51267c5e0
Allocate traits in scope upfront when type checking instead of recollecting them everytime
2023-03-05 15:04:46 +01:00
Lukas Wirth
a8606e5363
Re-use the resolver in InferenceContext instead of rebuilding it on every expression change
2023-03-05 14:37:44 +01:00
hkalbasi
ae8ce99d97
Bring back the hex in const hover
2023-03-05 13:53:49 +03:30
Lukas Wirth
b85e2af898
Correctly handle non-semi statement expressions for never coercions
2023-03-04 19:48:03 +01:00
Lukas Wirth
95c4cb991f
Handle new hir block kinds in scope calculations
2023-03-04 15:22:39 +01:00
Lukas Wirth
1b5bc83118
Remove weird nesting of effect blocks in hir
2023-03-04 14:45:57 +01:00
Lukas Wirth
24ba1bed04
Set expectation for no-semi expression statements to unit
2023-03-04 12:48:57 +01:00
Lukas Wirth
e7485a0416
Diagnose unresolved method calls
2023-03-03 20:43:13 +01:00
Lukas Wirth
78b2dd813a
Diagnose unresolved field accesses
2023-03-03 20:43:10 +01:00
Lukas Wirth
3c7a0aa00e
Diagnose call expression on non-callable things
2023-03-03 20:43:05 +01:00
bors
3ba876a4a6
Auto merge of #14240 - Veykril:coerce-many, r=Veykril
...
Diagnose value breaks in incorrect breakables
2023-03-03 17:03:39 +00:00
Lukas Wirth
41f234df09
Diagnose value breaks in incorrect breakables
2023-03-03 17:28:57 +01:00
Lukas Wirth
02eb2d758e
Distinguish between expected and final type in CoerceMany
2023-03-03 16:52:09 +01:00
bors
6756294aa0
Auto merge of #14184 - lowr:feat/trait-alias-def, r=Veykril
...
Handle trait alias definitions
Part of #2773
This PR adds a bunch of structs and enum variants for trait aliases. Trait aliases should be handled as an independent item because they are semantically distinct from traits.
I basically started by adding `TraitAlias{Id, Loc}` to `hir_def::item_tree` and iterated adding necessary stuffs until compiler stopped complaining what's missing. Let me know if there's still anything I need to add.
I'm opening up this PR for early review and stuff. I'm planning to add tests for IDE functionalities in this PR, but not type-related support, for which I put FIXME notes.
2023-03-03 15:45:18 +00:00
Ryo Yoshida
29c957f973
Lower and handle trait aliases in HIR
2023-03-04 00:24:07 +09:00
Lukas Wirth
522823f610
Fix text fixtures of missing_match_arms diagnostics
2023-03-03 11:13:06 +01:00
Lukas Wirth
44e2c6ea92
Don't emit two type mismatches for literal pattern mismatches
2023-03-03 10:42:49 +01:00
Lukas Wirth
ec273c3d12
Split pattern inference into more functions
2023-03-03 10:42:46 +01:00
Lukas Wirth
fc2b395e00
Show pattern mismatch diagnostics
2023-03-03 10:41:44 +01:00
hkalbasi
f64fe66c2a
Add tuple to render_const_scalar
2023-02-28 23:12:30 +03:30
Ryo Yoshida
b5a1ddf77c
Don't use unstable pointer
link
2023-02-28 21:22:20 +09:00