Florian Diebold
7ec3b66f7a
Turn Obligation into something similar to chalk_ir::DomainGoal
...
This includes starting to make use of Chalk's `Cast` trait.
2021-03-20 12:47:12 +01:00
Florian Diebold
7a5fb37cf1
Rename GenericPredicate -> WhereClause
2021-03-20 10:46:36 +01:00
Lukas Wirth
8996b1a235
Replace Projection variant in GenericPredicate with AliasEq
2021-03-19 12:12:18 +01:00
Florian Diebold
7a7e47eab7
Chalkify TraitRef
2021-03-18 21:53:19 +01:00
Florian Diebold
ce2cae45b5
Rename Substs -> Substitution
2021-03-16 17:58:17 +01:00
Florian Diebold
287e9a870c
Fix unification logic
2021-03-15 19:14:10 +01:00
bors[bot]
6139bd7649
Merge #8018
...
8018: Make Ty wrap TyKind in an Arc r=flodiebold a=flodiebold
... to further move towards Chalk.
This is a bit of a slowdown (218ginstr vs 213ginstr for inference on RA), even though it allows us to unwrap the Substs in `TyKind::Ref` etc..
Co-authored-by: Florian Diebold <flodiebold@gmail.com>
2021-03-15 12:51:27 +00:00
Aleksey Kladov
f7156cb0ae
Simplify source maps for fields
2021-03-15 15:38:50 +03:00
Florian Diebold
42217738e0
Don't use Substs for Ref/Raw/Array/Slice
2021-03-14 20:21:05 +01:00
Florian Diebold
af466f8542
Make Ty wrap TyKind in an Arc
...
... like it will be in Chalk. We still keep `interned_mut` and
`into_inner` methods that will probably not exist with Chalk.
This worsens performance slightly (5ginstr inference on RA), but doesn't
include other simplifications we can do yet.
2021-03-14 17:31:08 +01:00
Florian Diebold
eea777c714
Use chalk_ir::FnSig
2021-03-14 16:30:43 +01:00
Florian Diebold
3411fe3e84
Rename some fields to their Chalk names
2021-03-14 16:30:43 +01:00
Florian Diebold
3743ede404
Move type lowering methods to TyLoweringContext
2021-03-13 22:44:36 +01:00
Florian Diebold
b035c314b4
Use chalk_ir::OpaqueTyId
2021-03-13 20:05:47 +01:00
Florian Diebold
1bf6b7360c
Use chalk_ir::PlaceholderIndex
2021-03-13 19:47:34 +01:00
Florian Diebold
2d69eb131f
Use chalk_ir::ClosureId
2021-03-13 19:27:09 +01:00
Florian Diebold
9719ce9fc7
Use chalk_ir::FnDefId
2021-03-13 17:56:48 +01:00
Florian Diebold
19664e276a
Use chalk_ir::AssocTypeId
2021-03-13 17:56:48 +01:00
Florian Diebold
6c32bbf3ca
Separate Ty
and TyKind
like in Chalk
...
Currently `Ty` just wraps `TyKind`, but this allows us to change most
places to already use `intern` / `interned`.
2021-03-13 16:17:15 +01:00
Jonas Schievink
a430549aa6
Stop using ContainerId
in AssocContainerId
2021-03-09 18:27:23 +01:00
Laurențiu Nicola
fc9eed4836
Use upstream cov-mark
2021-03-08 22:19:44 +02:00
Lukas Wirth
50e01d2bc7
Use chalk_ir::AdtId
2021-03-04 19:38:02 +01:00
Lukas Wirth
7072f59fc6
Use chalk_ir::Mutability
2021-03-01 19:57:36 +01:00
Lukas Wirth
5d121cdb45
Introduce Ty::Alias
2021-03-01 14:24:00 +01:00
Lukas Wirth
4b7fc69315
Assert index relationship between type_variable_table and var_unification_table
2021-03-01 13:54:17 +01:00
Lukas Wirth
11a1f13cd1
Being Ty::InferenceVar closes to chalk equivalent
2021-03-01 12:41:29 +01:00
bors[bot]
5df3ee8274
Merge #7816
...
7816: Lift Ty::Fn into a struct r=Veykril a=Veykril
bors r+
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-02-28 22:54:07 +00:00
Lukas Wirth
407196b8c0
Lift FnPointer into a struct
2021-02-28 23:53:21 +01:00
cynecx
2cdd1ff1b5
hir_ty: use default type generic for box expressions
2021-02-28 21:18:30 +01:00
Lukas Wirth
0e995adcf6
Turn Ty::Tuple variant into a tuple-variant
2021-02-28 20:39:43 +01:00
Lukas Wirth
a3f5491a1a
Inline TypeCtor into Ty
2021-02-28 19:13:37 +01:00
Lukas Wirth
7c2dd85a32
Use chalk_ir::Scalar directly
2021-02-28 11:06:37 +01:00
Lukas Wirth
5183c9f083
Introduce TypeCtor::Scalar
2021-02-28 01:20:04 +01:00
Jonas Schievink
a00fa0c06f
Put the old resolver back
2021-02-10 15:12:45 +01:00
Jonas Schievink
e837df8479
infer: update resolver when descending into block
2021-02-10 14:41:54 +01:00
Jonas Schievink
b7be2b1d3c
Use block_def_map in body lowering
2021-02-03 14:21:15 +01:00
Jonas Schievink
7202ce6c96
Revert "Use block_def_map in body lowering"
2021-02-02 11:46:58 +01:00
Jonas Schievink
9cc7d57429
Use block_def_map in body lowering
2021-02-01 13:33:18 +01:00
Thiébaud Weksteen
be0691b02b
Handle box with allocator
...
In 1.49.0, the definition of Box was modified to support an optional
Allocator[1]. Adapt the parsing of the `box` keyword to supply the
expected number of parameters to the constructor.
[1] f288cd2e17
2021-01-22 13:50:23 +01:00
Daiki Ihara
85cd3524e2
Add support for yiled keyword
2021-01-15 23:35:17 +09:00
bors[bot]
0e5fe47153
Merge #7080
...
7080: Implement ConstParams for HIR r=Veykril a=Veykril
r? @flodiebold
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-01-01 13:45:10 +00:00
Lukas Wirth
0acdb73076
Add ConstParams to the HIR
2021-01-01 10:06:42 +01:00
Laurențiu Nicola
fbeccf0b9d
Allow spurious warning from rust-lang/rust#80501
2020-12-30 11:37:52 +02:00
bors[bot]
06320015af
Merge #7021
...
7021: Track labels in the HIR r=matklad a=Veykril
Groundwork for #6966
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2020-12-24 12:04:28 +00:00
Lukas Wirth
262b9c3982
Track labels in the HIR
2020-12-24 12:49:40 +01:00
Lukas Wirth
a142beaf01
Implement const block inference
2020-12-23 12:24:24 +01:00
Lukas Wirth
0a780c0ab3
Implement const pat inference
2020-12-23 12:15:38 +01:00
Lukas Wirth
ae8a802085
Ignore lifetime params in substitutions
2020-12-13 11:34:44 +01:00
bors[bot]
479d1f7eec
Merge #6818
...
6818: Add Lifetimes to the HIR r=matklad a=Veykril
This doesn't handle resolve yet as I don't know yet how that will be used. I'll get to that once I start moving the lifetime reference PR to the hir.
This also adds a new `hir` name type for lifetimes and labels, `hir::LifetimeName`.
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2020-12-12 14:35:38 +00:00
Lukas Wirth
11f8664182
Add Lifetimes to the HIR
2020-12-12 00:56:52 +01:00