aboutsummaryrefslogtreecommitdiff
path: root/crates/hir_ty/src/infer/unify.rs
Commit message (Collapse)AuthorAgeFilesLines
* Record method call substs and use them in call infoFlorian Diebold2021-05-231-2/+5
|
* Resolve any lifetime variables to 'static after inferenceFlorian Diebold2021-05-221-1/+13
| | | | | | | | Chalk's unification can sometimes create lifetime variables, which we currently don't really deal with, but at least we don't want to leak them outside of inference. Should fix #8919.
* Clean up visibilitiesFlorian Diebold2021-05-211-10/+10
|
* Some remaining cleanupsFlorian Diebold2021-05-211-4/+3
|
* Remove TypeVariableTableFlorian Diebold2021-05-211-55/+47
|
* Deal with goals arising from unificationFlorian Diebold2021-05-211-6/+7
|
* Get rid of resolve_ty_as_possibleFlorian Diebold2021-05-211-36/+3
| | | | Instead use shallow resolving where necessary.
* Make resolve_ty_shallow return TyFlorian Diebold2021-05-211-6/+3
|
* Rework obligation handlingFlorian Diebold2021-05-211-25/+148
| | | | | | | | 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 another panicFlorian Diebold2021-05-211-17/+15
|
* Fix panicFlorian Diebold2021-05-211-1/+4
|
* Fix HIR expecting errors to unify with anythingFlorian Diebold2021-05-211-2/+6
|
* Make diverging type variables work againFlorian Diebold2021-05-211-0/+20
| | | | | Chalk doesn't know about the `diverging` flag, so we need to instead propagate it before fully resolving the variables.
* Update tests with expected changesFlorian Diebold2021-05-211-3/+0
|
* Make type resolver a proper folder, make it resolve consts as wellFlorian Diebold2021-05-211-48/+117
|
* Fix fallback to bound vars in `unify`Florian Diebold2021-05-211-45/+78
|
* Fix warnings & formatFlorian Diebold2021-05-211-11/+3
|
* Rewrite coercion using the new unificationFlorian Diebold2021-05-211-12/+25
|
* Remove our unification code, use Chalk's insteadFlorian Diebold2021-05-211-402/+97
|
* fix: closure unify without check ClosureIdComonad2021-04-291-0/+4
| | | | closes #8604
* Remove unusedFlorian Diebold2021-04-081-1/+1
|
* Fix `Canonicalized::apply_solution`Florian Diebold2021-04-081-13/+16
| | | | | | Now that we're using Chalk's `substitute` which actually knows about lifetimes, the hack doesn't work anymore, but we can put in a proper lifetime.
* Fix missing match armsFlorian Diebold2021-04-081-0/+1
|
* Replace remaining `fold` callsFlorian Diebold2021-04-081-49/+62
|
* Replace some `fold` callsFlorian Diebold2021-04-081-15/+4
|
* Add HasInterner boundsFlorian Diebold2021-04-081-4/+12
|
* Move `equals_ctor` to `TyExt`Florian Diebold2021-04-071-1/+2
| | | | | | 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).
* Align `InferenceVar` to ChalkFlorian Diebold2021-04-061-12/+24
|
* Add chalk_ir::Const to TyKind::ArrayLukas Wirth2021-04-061-1/+3
|
* Add Lifetime to TyKind::RefLukas Wirth2021-04-061-1/+1
|
* Align FnPointer with ChalkFlorian Diebold2021-04-051-3/+3
|
* Get rid of subst_bound_vars usesFlorian Diebold2021-04-051-3/+3
|
* Get rid of some walk_mut usesFlorian Diebold2021-04-051-6/+9
|
* Rename TyKind::Unknown to ErrorLaurențiu Nicola2021-04-051-2/+2
|
* Move things in hir_ty into submodulesFlorian Diebold2021-04-041-1/+1
| | | | | - all the types that will be replaced by Chalk go to `types` - `TypeWalk` impls go to `walk`
* Replace last uses of SubstsBuilder by TyBuilderFlorian Diebold2021-04-041-8/+5
|
* Rename Ty::interned to Ty::kindFlorian Diebold2021-04-031-6/+6
| | | | ... since that's the actual method on Chalk side that matches the signature.
* Introduce `GenericArg` like in ChalkFlorian Diebold2021-04-031-25/+30
| | | | | | | Plus some more adaptations to Substitution. Lots of `assert_ty_ref` that we should revisit when introducing lifetime/const parameters.
* Don't recheck obligations if we have learned nothing newFlorian Diebold2021-04-011-1/+7
| | | | | | | | | | This is just the most trivial check: If no inference variables have been updated, and there are no new obligations, we can just skip trying to solve them again. We could be smarter about it, but this already helps quite a bit, and I don't want to touch this too much before we replace the inference table by Chalk's. Fixes #8263 (well, improves it quite a bit).
* completion relevance consider if types can be unifiedJosh Mcguigan2021-03-261-0/+4
|
* Align InEnvironment with ChalkFlorian Diebold2021-03-211-5/+2
| | | | | | 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.
* Align Canonical more with Chalk's versionFlorian Diebold2021-03-211-14/+30
| | | | In particular, use chalk_ir::CanonicalVarKinds.
* Introduce QuantifiedWhereClause and DynTy analogous to ChalkFlorian Diebold2021-03-211-3/+12
| | | | | This introduces a bunch of new binders in lots of places, which we have to be careful about, but we had to add them at some point.
* Turn Obligation into something similar to chalk_ir::DomainGoalFlorian Diebold2021-03-201-8/+5
| | | | This includes starting to make use of Chalk's `Cast` trait.
* Rename GenericPredicate -> WhereClauseFlorian Diebold2021-03-201-11/+6
|
* Replace Projection variant in GenericPredicate with AliasEqLukas Wirth2021-03-191-12/+23
|
* Chalkify TraitRefFlorian Diebold2021-03-181-2/+2
|
* Rename Substs -> SubstitutionFlorian Diebold2021-03-161-8/+8
|
* Fix unification logicFlorian Diebold2021-03-151-1/+1
|
* Don't use Substs for Ref/Raw/Array/SliceFlorian Diebold2021-03-141-5/+19
|