aboutsummaryrefslogtreecommitdiff
path: root/crates/hir_ty/src/infer/coerce.rs
Commit message (Collapse)AuthorAgeFilesLines
* Some remaining cleanupsFlorian Diebold2021-05-211-10/+10
|
* Record type mismatches for failed coercions in match etc.Florian Diebold2021-05-211-5/+9
|
* Refactor expectation handlingFlorian Diebold2021-05-211-4/+0
| | | | So as to not use `TyKind::Error` as "no expectation".
* Remove TypeVariableTableFlorian Diebold2021-05-211-1/+1
|
* Deal with goals arising from unificationFlorian Diebold2021-05-211-8/+10
|
* Get rid of resolve_ty_as_possibleFlorian Diebold2021-05-211-2/+2
| | | | Instead use shallow resolving where necessary.
* Make resolve_ty_shallow return TyFlorian Diebold2021-05-211-5/+3
|
* Rework obligation handlingFlorian Diebold2021-05-211-2/+5
| | | | | | | | We can't do the easy hack that we did before anymore, where we kept track of whether any inference variables changed since the last time we rechecked obligations. Instead, we store the obligations in canonicalized form; that way we can easily check the inference variables to see whether they have changed since the goal was canonicalized.
* Fix handling of diverging branches in match coercionFlorian Diebold2021-05-211-4/+13
| | | | Fixes #7626.
* Fix coercion of two closures to a function pointerFlorian Diebold2021-05-211-19/+31
| | | | Fixes #8604.
* Temporary fix for unknown expectationsFlorian Diebold2021-05-211-0/+4
|
* Fix warnings & formatFlorian Diebold2021-05-211-6/+5
|
* Rewrite coercion using the new unificationFlorian Diebold2021-05-211-84/+317
|
* Remove our unification code, use Chalk's insteadFlorian Diebold2021-05-211-5/+5
|
* Remove unusedFlorian Diebold2021-04-081-2/+2
|
* Fix remaining `interned_mut` callFlorian Diebold2021-04-081-4/+6
|
* InEnvironment::new takes a referenceFlorian Diebold2021-04-071-1/+1
|
* Remove `SolutionVariables`, add ConstrainedSubst analogous to ChalkFlorian Diebold2021-04-061-2/+9
| | | | ... just missing the constraints.
* Move Ty accessors to TyExtLukas Wirth2021-04-061-1/+1
|
* Add Lifetime to TyKind::RefLukas Wirth2021-04-061-2/+4
|
* Move things from `traits` module to `types` as wellFlorian Diebold2021-04-041-1/+1
|
* Replace remaining uses of Substitution::build_for_defFlorian Diebold2021-04-041-4/+1
|
* More TyBuilder useFlorian Diebold2021-04-041-12/+9
|
* Move Ty::fn_ptr to TyBuilderFlorian Diebold2021-04-041-4/+5
|
* Rename Ty::interned to Ty::kindFlorian Diebold2021-04-031-4/+4
| | | | ... since that's the actual method on Chalk side that matches the signature.
* Introduce `GenericArg` like in ChalkFlorian Diebold2021-04-031-1/+1
| | | | | | | Plus some more adaptations to Substitution. Lots of `assert_ty_ref` that we should revisit when introducing lifetime/const parameters.
* Align InEnvironment with ChalkFlorian Diebold2021-03-211-3/+3
| | | | | | This in particular means storing a chalk_ir::Environment, not our TraitEnvironment. This makes InEnvironment not usable for Type, where we need to keep the full TraitEnvironment.
* Turn Obligation into something similar to chalk_ir::DomainGoalFlorian Diebold2021-03-201-4/+3
| | | | This includes starting to make use of Chalk's `Cast` trait.
* Chalkify TraitRefFlorian Diebold2021-03-181-2/+4
|
* Rename Substs -> SubstitutionFlorian Diebold2021-03-161-2/+4
|
* Don't use Substs for Ref/Raw/Array/SliceFlorian Diebold2021-03-141-8/+2
|
* Make Ty wrap TyKind in an ArcFlorian Diebold2021-03-141-1/+1
| | | | | | | | ... 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.
* Separate `Ty` and `TyKind` like in ChalkFlorian Diebold2021-03-131-17/+21
| | | | | Currently `Ty` just wraps `TyKind`, but this allows us to change most places to already use `intern` / `interned`.
* Use upstream cov-markLaurențiu Nicola2021-03-081-3/+2
|
* Use chalk_ir::MutabilityLukas Wirth2021-03-011-7/+7
|
* Introduce Ty::AliasLukas Wirth2021-03-011-5/+5
|
* Being Ty::InferenceVar closes to chalk equivalentLukas Wirth2021-03-011-4/+4
|
* Lift FnPointer into a structLukas Wirth2021-02-281-2/+2
|
* Inline TypeCtor into TyLukas Wirth2021-02-281-43/+36
|
* Rename ra_hir_ty -> hir_tyAleksey Kladov2020-08-131-0/+197