Zachary S
6746a08b44
fix: Fix return type of async closures.
...
(rebased onto 6dfd8ae
)
2023-03-15 13:10:00 +01:00
hkalbasi
d7da9e64d1
Add storage dead for let bindings without initializer
2023-03-14 12:15:16 +03:30
hkalbasi
af90ec8096
Partially support "overloaded deref" MIR lowering
2023-03-06 21:09:09 +03:30
hkalbasi
6377d50bd1
Support "for loop" MIR lowering
2023-03-06 21:09:09 +03:30
hkalbasi
61ad6a96ad
Add BindingId
2023-03-06 21:09:08 +03:30
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
Lukas Wirth
b85e2af898
Correctly handle non-semi statement expressions for never coercions
2023-03-04 19:48:03 +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
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
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
cd67589f63
beginning of MIR
2023-02-27 23:45:54 +03:30
Lukas Wirth
7677f41f41
Preallocate some vecs
2023-02-10 16:42:09 +01:00
Lukas Wirth
79492cb8ae
internal: Revert castable expectation and simplify
2023-02-10 16:08:47 +01:00
Lukas Wirth
f8f1cb93e0
fix: Implement Expactation::Castable and add a test case for it
2023-02-08 13:07:59 +01:00
Lukas Wirth
4b4eabad3c
Record method resolution for try expressions
2023-01-27 11:25:34 +01:00
Lukas Wirth
a7f81e3cdc
Record method resolution for index expressions
2023-01-27 11:15:05 +01:00
Lukas Wirth
54da0bfbf0
Record method resolution for call expressions
2023-01-27 11:06:41 +01:00
Lukas Wirth
1535881836
Replace SmolStr usage with lang item enum for lang items
2023-01-21 17:55:45 +01:00
Ryo Yoshida
c53064fb58
Enforce builtin binop expectations even without lang items
2023-01-17 20:17:15 +09:00
Ryo Yoshida
461435adab
Enforce builtin binop expectations on single references
...
Also don't enforce them on non-builtin types
2023-01-17 20:17:09 +09:00
Maybe Waffle
bd04416aaa
Iterate over arrays dirrectly, instead of going through a slice
2023-01-14 13:02:28 +00:00
Daniel Eades
d218b237fd
collapse some nested blocks
2023-01-10 20:40:08 +00:00
bors
f77b68a3cb
Auto merge of #13860 - danieleades:clippy, r=lnicola
...
fix a bunch of clippy lints
fixes a bunch of clippy lints for fun and profit
i'm aware of this repo's position on clippy. The changes are split into separate commits so they can be reviewed separately
2023-01-08 17:29:57 +00:00
Ryo Yoshida
d01630c8f3
Apply fallback to scalar type variables before final obligation resolution
2023-01-06 06:07:08 +09:00
Ryo Yoshida
b183612610
Add INTEGER
and FLOAT
flags for type variables
2023-01-05 23:10:06 +09:00
Ryo Yoshida
1bfc732b78
Store diverging flag for type variables as bitflags
2023-01-05 23:10:00 +09:00
Lukas Wirth
b996a54cd8
Skip lifetime elision on fn pointers and fn trait types
2023-01-03 11:58:31 +01:00
Lukas Wirth
f51111aacb
Write down adjustments introduced by binary operators
2023-01-02 23:16:09 +01:00
Daniel Eades
efd2c20e96
remove useless conversions
2023-01-02 15:02:54 +00:00
Daniel Eades
ed128872eb
remove needless borrows
2023-01-02 14:52:32 +00:00
Lukas Wirth
eee7de0225
Diagnose private assoc item accesses
2023-01-01 13:24:48 +01:00
Lukas Wirth
e3d144d17f
Diagnose private field accesses
2022-12-31 14:20:59 +01:00
Lukas Wirth
5d54c550e7
Fallback to invisible associated functions and constants if no visible resolutions are found
2022-12-30 23:56:08 +01:00
bors
20b0ae4afe
Auto merge of #13857 - WaffleLapkin:yeet, r=Veykril
...
feat: Implement yeeting
See tracking issue: https://github.com/rust-lang/rust/issues/96373
Before:
![2022-12-29_03-19](https://user-images.githubusercontent.com/38225716/209884634-e34e98fb-615d-4954-9614-7f9ce6291678.png )
After:
![2022-12-29_03-21](https://user-images.githubusercontent.com/38225716/209884633-4bba5eba-6dcc-4714-86cb-5c0d1f358364.png )
2022-12-30 21:48:23 +00:00
Maybe Waffle
346bf5fb5b
Implement do yeet
expression
2022-12-28 23:17:13 +00:00
Maybe Waffle
aaa682c534
Implement try{}
block type inference
2022-12-28 21:25:47 +00:00
Maybe Waffle
eecab99dec
Allow break
and co to go through try{}
blocks
2022-12-28 20:56:58 +00:00
Florian Diebold
d3cb032f7e
Make assoc_resolutions always have a Substitution
2022-12-10 17:05:33 +01:00
bvanjoi
7012b50db5
feat: resolve const for trait impls( close #13694 )
2022-12-10 20:06:25 +08:00
Laurențiu Nicola
79923c382a
⬆️ rust-analyzer
2022-11-09 21:49:10 +02:00