Florian Diebold
8a2c482082
More cleanups
2021-04-09 14:33:31 +02:00
Florian Diebold
2f02977e56
More moving stuff around
2021-04-09 14:28:04 +02:00
Florian Diebold
5ca481bbdc
Move ToChalk -> mapping
2021-04-09 14:15:26 +02:00
Florian Diebold
743faa21e7
Reorganize hir_ty modules
...
Chalk isn't really a 'traits' thing anymore, so it doesn't make sense to
have all the Chalk-related stuff in submodules of `traits`.
2021-04-09 14:11:37 +02:00
Florian Diebold
be03db0e3a
Intern Substitutions
...
(Costs a bit of performance, reduces memory usage on RA by ~10%.)
2021-04-08 22:48:47 +02:00
Florian Diebold
d992736e79
Remove unused
2021-04-08 14:36:14 +02:00
Florian Diebold
0f058d61ce
Replace remaining fold
calls
2021-04-08 14:08:55 +02:00
Florian Diebold
caee3b6c2d
Replace some fold
calls
2021-04-08 14:08:55 +02:00
Florian Diebold
b25b147e86
Fix shifted_{in,out} calls
2021-04-08 14:08:55 +02:00
Florian Diebold
dc0b581736
Fix subst_prefix
2021-04-08 14:08:55 +02:00
Florian Diebold
b24e6f6030
Impl Fold for CallableSig
2021-04-08 14:08:55 +02:00
Florian Diebold
7e541e69b1
Add HasInterner bounds
2021-04-08 14:08:55 +02:00
Florian Diebold
926bfef0ef
Allow unused
2021-04-08 14:08:55 +02:00
Florian Diebold
77d974ae6b
Replace all the types by their Chalk versions
2021-04-08 14:08:54 +02:00
bors[bot]
3191a93185
Merge #8409
...
8409: Various remaining fixes for Chalk IR move r=flodiebold a=flodiebold
CC #8313
Co-authored-by: Florian Diebold <flodiebold@gmail.com>
2021-04-07 18:51:36 +00:00
Florian Diebold
d1b645d236
Make Canonical::new a free-standing function
2021-04-07 20:47:04 +02:00
Florian Diebold
6777a4975d
Move hir_trait_id to extension trait
2021-04-07 20:40:01 +02:00
Florian Diebold
4c35df47e8
Move equals_ctor
to TyExt
...
I'd prefer getting rid of it, but it's used in the impl search and not
super easy to replace there (I think ideally the impl search would do
proper unification, but that's a bit more complicated).
2021-04-07 20:08:50 +02:00
Florian Diebold
92dcc53f94
Remove Ty::substs{_mut}
...
Almost all uses actually only care about ADT substs, so it's better to
be explicit. The methods were a bad abstraction anyway since they
already didn't include the inner types of e.g. `TyKind::Ref` anymore.
2021-04-07 17:56:53 +02:00
Lukas Wirth
e3a5c15d18
Move Ty::builtin_deref
2021-04-07 13:06:48 +02:00
Florian Diebold
768ee3e47a
Align InferenceVar
to Chalk
2021-04-06 21:10:22 +02:00
Lukas Wirth
9b4699a9be
Move Ty accessors to TyExt
2021-04-06 13:58:48 +02:00
Lukas Wirth
9fbba7bc45
Add chalk_ir::Const to TyKind::Array
2021-04-06 11:45:41 +02:00
Lukas Wirth
08dc69599e
Use a constructor function for Static lifetimes
2021-04-06 10:50:55 +02:00
Lukas Wirth
96756f1b1d
Add Lifetime to TyKind::Ref
2021-04-06 10:45:30 +02:00
Florian Diebold
edc59d897d
Align FnPointer with Chalk
2021-04-05 22:23:30 +02:00
Florian Diebold
b67148daea
Substitution::prefix -> subst_prefix
...
I probably want to get rid of this function completely later.
2021-04-05 21:58:53 +02:00
Florian Diebold
2a83645e1b
Get rid of Substitution::suffix
2021-04-05 21:58:03 +02:00
Florian Diebold
b443e5304e
Remove some unused methods, move some to types.rs
2021-04-05 21:58:03 +02:00
Florian Diebold
738174671a
Binders::wrap_empty -> wrap_empty_binders
2021-04-05 21:58:03 +02:00
Florian Diebold
2f5a77658b
Substitution::single -> from1
2021-04-05 21:58:03 +02:00
Florian Diebold
788533d380
Move ProjectionTy methods to extension trait
2021-04-05 21:58:01 +02:00
Lukas Wirth
d587ca2991
Replace unused hir_ty::Lifetime with chalk equivalents
2021-04-05 20:46:15 +02:00
Florian Diebold
a316d58360
Rename shift_bound_vars{_out} to align with Chalk
2021-04-05 19:21:03 +02:00
Florian Diebold
30a339e038
Add Interner parameter to Binders::substitute
2021-04-05 19:21:01 +02:00
Florian Diebold
05eba0db3d
Binders::subst -> substitute
2021-04-05 19:20:28 +02:00
Florian Diebold
ad20f00844
Use VariableKinds in Binders
2021-04-05 19:19:18 +02:00
Florian Diebold
69714d36e6
Hide Binders internals more
2021-04-05 19:19:18 +02:00
Laurențiu Nicola
d7546d8c23
Pass interner to TraitRef::self_type_parameter
2021-04-05 17:38:37 +03:00
Laurențiu Nicola
aefcbf2758
Pass interner to ProjectionTy::self_type_parameter
2021-04-05 17:37:24 +03:00
Laurențiu Nicola
72c54c53cd
Rename TyKind::ForeignType to Foreign
2021-04-05 15:39:06 +03:00
Laurențiu Nicola
65c2e51940
Rename TyKind::Unknown to Error
2021-04-05 15:39:06 +03:00
Florian Diebold
645a9c3a27
Move things from traits
module to types
as well
2021-04-04 20:27:40 +02:00
Florian Diebold
508a1ecad3
Move things in hir_ty into submodules
...
- all the types that will be replaced by Chalk go to `types`
- `TypeWalk` impls go to `walk`
2021-04-04 20:22:00 +02:00
Florian Diebold
ebdfc932e7
Replace Substitution::type_params
2021-04-04 13:16:39 +02:00
Florian Diebold
a4d7bdf1c8
Replace Substitution::bound_vars and ::type_params_for_generics
2021-04-04 13:16:39 +02:00
Florian Diebold
715c178f0b
Move TyBuilder to its own module
2021-04-04 13:16:39 +02:00
Florian Diebold
584d1c9e5b
Replace last uses of SubstsBuilder by TyBuilder
2021-04-04 13:16:39 +02:00
Florian Diebold
505ca65216
Remove CallableSig::from_substs
2021-04-04 13:16:39 +02:00
Florian Diebold
eaa03ef446
Some more TyBuilder use
2021-04-04 13:16:38 +02:00