Lukas Wirth
ffdb2da49d
Don't use HirDisplayWrapper when displaying SourceCode
2021-04-06 14:21:35 +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
b98c681cb7
Always use Static lifetimes in chalk mapping
2021-04-06 10:45:34 +02:00
Lukas Wirth
9da191c7e0
Add Lifetime to DynTy
2021-04-06 10:45:34 +02:00
Lukas Wirth
96756f1b1d
Add Lifetime to TyKind::Ref
2021-04-06 10:45:30 +02:00
Florian Diebold
1ae967bf8e
Fix shifting of binders in FnPointer
...
- don't shift in/out for Chalk mapping (we want to have the same
binders now)
- do shift in when creating the signature for a closure (though it
shouldn't matter much)
- do shift in when lowering a `fn()` type
- correctly deal with the implied binder in TypeWalk
2021-04-05 23:00:50 +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
bors[bot]
8c96a7d81e
Merge #8353
...
8353: Replace hir_ty::Lifetime with chalk equivalent r=flodiebold a=Veykril
Our `Lifetime` isn't really used yet so this is a rather simple change
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-04-05 19:34:50 +00:00
Lukas Wirth
d587ca2991
Replace unused hir_ty::Lifetime with chalk equivalents
2021-04-05 20:46:15 +02:00
Jonas Schievink
f48dd154a5
Use more assoc. type aliases in the chalk interner
...
Makes it sligthly easier to swap out these types
2021-04-05 20:15:07 +02:00
Florian Diebold
a316d58360
Rename shift_bound_vars{_out} to align with Chalk
2021-04-05 19:21:03 +02:00
Florian Diebold
fbab69cbff
Get rid of subst_bound_vars uses
2021-04-05 19:21:03 +02:00
Florian Diebold
e28f0c98ba
Get rid of some walk_mut uses
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
kjeremy
b246f57fad
Use arrayvec 0.7 to avoid perf regression in 0.6.1
...
See: https://github.com/bluss/arrayvec/issues/182
2021-04-05 12:58:35 -04: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
Jonas Schievink
7c0c713a10
Intern GenericParams
...
Also share the same instance between `ItemTree` and `generic_params`
query.
2021-04-05 03:50:10 +02:00
Jonas Schievink
24e876b52e
Intern more TypeRef
s in generics
...
Saves ~3 MB
2021-04-05 02:03:37 +02: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
cde3857897
Add comment
2021-04-04 13:23:22 +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
ac8fee006a
Use TyBuilder in another place
2021-04-04 13:16:38 +02:00
Florian Diebold
eaa03ef446
Some more TyBuilder use
2021-04-04 13:16:38 +02:00
Florian Diebold
5d2b488aeb
Replace remaining uses of Substitution::build_for_def
2021-04-04 13:16:38 +02:00
Florian Diebold
77333a571f
More TyBuilder use
2021-04-04 13:16:38 +02:00
Florian Diebold
66fec39aa0
More TyBuilder use
2021-04-04 13:16:38 +02:00
Florian Diebold
cd227f581e
Add and start using TraitRef and ProjectionTy builders
2021-04-04 13:16:38 +02:00
Florian Diebold
2ead65190e
Move Ty::builtin to TyBuilder
2021-04-04 13:16:38 +02:00
Florian Diebold
620769f322
Add TyBuilder::adt
2021-04-04 13:16:38 +02:00
Florian Diebold
e6f007d9a8
Move Ty::fn_ptr to TyBuilder
2021-04-04 13:16:38 +02:00
Florian Diebold
b0fe3d929f
Add TyBuilder::unit() and TyExt::is_unit()
2021-04-04 13:16:38 +02:00
Florian Diebold
b15152c430
Add TyBuilder
2021-04-04 13:16:38 +02:00