aboutsummaryrefslogtreecommitdiff
path: root/crates/hir_ty/src/infer.rs
Commit message (Collapse)AuthorAgeFilesLines
* InEnvironment::new takes a referenceFlorian Diebold2021-04-071-1/+1
|
* Merge #8394bors[bot]2021-04-071-33/+37
|\ | | | | | | | | | | | | | | 8394: Infer variants through type aliased enums r=Veykril a=Veykril bors r+ Co-authored-by: Lukas Wirth <[email protected]>
| * Infer variants through type aliased enumsLukas Wirth2021-04-071-33/+37
| |
* | Remove `SolutionVariables`, add ConstrainedSubst analogous to ChalkFlorian Diebold2021-04-061-4/+11
| | | | | | | | ... just missing the constraints.
* | Align `InferenceVar` to ChalkFlorian Diebold2021-04-061-19/+0
| |
* | infer: remove `record_pat_field_resolutions` fieldJonas Schievink2021-04-061-5/+1
|/ | | | | Same as https://github.com/rust-analyzer/rust-analyzer/pull/8376, this can be computed from other data
* infer: remove `record_field_resolutions` fieldJonas Schievink2021-04-061-5/+0
| | | | | It stores no useful data, since we can derive all fields from `variant_resolutions`
* Move Ty accessors to TyExtLukas Wirth2021-04-061-1/+1
|
* Add Interner parameter to Binders::substituteFlorian Diebold2021-04-051-4/+4
|
* Binders::subst -> substituteFlorian Diebold2021-04-051-4/+4
|
* Rename TyKind::Unknown to ErrorLaurențiu Nicola2021-04-051-7/+7
|
* Move things from `traits` module to `types` as wellFlorian Diebold2021-04-041-2/+2
|
* Replace Substitution::bound_vars and ::type_params_for_genericsFlorian Diebold2021-04-041-2/+2
|
* Replace remaining uses of Substitution::build_for_defFlorian Diebold2021-04-041-2/+1
|
* Add and start using TraitRef and ProjectionTy buildersFlorian Diebold2021-04-041-5/+3
|
* Rename Ty::interned to Ty::kindFlorian Diebold2021-04-031-2/+2
| | | | ... since that's the actual method on Chalk side that matches the signature.
* minor: add profile call for resolve_obligationsAleksey Kladov2021-04-021-0/+2
|
* Don't recheck obligations if we have learned nothing newFlorian Diebold2021-04-011-3/+15
| | | | | | | | | | 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/+5
|
* Align InEnvironment with ChalkFlorian Diebold2021-03-211-1/+1
| | | | | | 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-6/+6
| | | | This includes starting to make use of Chalk's `Cast` trait.
* Replace Projection variant in GenericPredicate with AliasEqLukas Wirth2021-03-191-9/+9
|
* Chalkify TraitRefFlorian Diebold2021-03-181-2/+3
|
* Rename Substs -> SubstitutionFlorian Diebold2021-03-161-4/+4
|
* Merge #8018bors[bot]2021-03-151-6/+24
|\ | | | | | | | | | | | | | | | | | | 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 <[email protected]>
| * Make Ty wrap TyKind in an ArcFlorian Diebold2021-03-141-6/+24
| | | | | | | | | | | | | | | | ... 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.
* | Simplify source maps for fieldsAleksey Kladov2021-03-151-3/+3
|/
* Rename some fields to their Chalk namesFlorian Diebold2021-03-141-2/+2
|
* Move type lowering methods to TyLoweringContextFlorian Diebold2021-03-131-5/+5
|
* Create TraitEnvironment through a queryFlorian Diebold2021-03-131-1/+3
|
* Use chalk_ir::PlaceholderIndexFlorian Diebold2021-03-131-1/+1
|
* Use chalk_ir::AssocTypeIdFlorian Diebold2021-03-131-2/+5
|
* Separate `Ty` and `TyKind` like in ChalkFlorian Diebold2021-03-131-21/+28
| | | | | Currently `Ty` just wraps `TyKind`, but this allows us to change most places to already use `intern` / `interned`.
* Use chalk_ir::MutabilityLukas Wirth2021-03-011-2/+3
|
* Introduce Ty::AliasLukas Wirth2021-03-011-2/+2
|
* Being Ty::InferenceVar closes to chalk equivalentLukas Wirth2021-03-011-21/+7
|
* Inline TypeCtor into TyLukas Wirth2021-02-281-13/+4
|
* Introduce TypeCtor::ScalarLukas Wirth2021-02-281-3/+3
|
* Make `ModPath`'s representation privateJonas Schievink2021-02-041-1/+1
|
* Remove map module from la-arena public APIAramis Razzaghipour2021-01-151-1/+1
| | | | | | It’s unlikely that more items will be added to the module, so it’s simpler for users if `ArenaMap` is re-exported and the module made private.
* prepare to publish el libro de arenaAleksey Kladov2021-01-141-1/+1
|
* Remove more unreachable pubsAleksey Kladov2020-11-021-1/+1
|
* Deny unreachable-pubAleksey Kladov2020-11-021-3/+3
| | | | | | | | It's very useful when `pub` is equivalent to "this is crate's public API", let's enforce this! Ideally, we should enforce it for local `cargo test`, and only during CI, but that needs https://github.com/rust-lang/cargo/issues/5034.
* Implement binary operator overloading type inferenceRoland Ruckerbauer2020-10-131-1/+23
|
* Bump smol_str from 0.1.16 to 0.1.17Jean SIMARD2020-09-241-1/+1
|
* Rename record_field_pat to record_pat_fieldPavan Kumar Sunkara2020-09-101-3/+3
|
* Rename ra_hir_ty -> hir_tyAleksey Kladov2020-08-131-0/+802