aboutsummaryrefslogtreecommitdiff
path: root/crates/hir_ty/src/infer/pat.rs
Commit message (Collapse)AuthorAgeFilesLines
* Get rid of resolve_ty_as_possibleFlorian Diebold2021-05-211-10/+9
| | | | Instead use shallow resolving where necessary.
* internal: Record mismatches of pattern types.Dawer2021-05-191-2/+5
|
* Fix false positive "Missing match arm".Dawer2021-05-141-4/+5
|
* Intern SubstitutionsFlorian Diebold2021-04-081-2/+2
| | | | (Costs a bit of performance, reduces memory usage on RA by ~10%.)
* Fix return type of Substitution::internedFlorian Diebold2021-04-071-1/+1
|
* Remove Ty::substs{_mut}Florian Diebold2021-04-071-2/+4
| | | | | | 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.
* infer: remove `record_pat_field_resolutions` fieldJonas Schievink2021-04-061-6/+0
| | | | | 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-4/+4
| | | | | It stores no useful data, since we can derive all fields from `variant_resolutions`
* Merge #8364bors[bot]2021-04-061-2/+2
|\ | | | | | | | | | | | | | | | | | | 8364: Memory usage improvements r=jonas-schievink a=alexmaco These are mostly focused on splitting up enum variants with large size differences between variants by `Box`-ing things up. In my testing this reduces the memory usage somewhere in the low percentages, even though the measurements are quite noisy. Co-authored-by: Alexandru Macovei <[email protected]>
| * Use Box'es to reduce the size of hir_def::expr::Pat from 112 to 64 bytes on ↵Alexandru Macovei2021-04-061-2/+2
| | | | | | | | 64bit
* | Move Ty accessors to TyExtLukas Wirth2021-04-061-1/+1
| |
* | Add chalk_ir::Const to TyKind::ArrayLukas Wirth2021-04-061-5/+8
| |
* | Use a constructor function for Static lifetimesLukas Wirth2021-04-061-9/+6
| |
* | Add Lifetime to TyKind::RefLukas Wirth2021-04-061-8/+12
|/
* Add Interner parameter to Binders::substituteFlorian Diebold2021-04-051-3/+6
|
* Binders::subst -> substituteFlorian Diebold2021-04-051-2/+2
|
* Move things in hir_ty into submodulesFlorian Diebold2021-04-041-2/+2
| | | | | - all the types that will be replaced by Chalk go to `types` - `TypeWalk` impls go to `walk`
* Add TyBuilder::adtFlorian Diebold2021-04-041-19/+7
|
* Rename Ty::interned to Ty::kindFlorian Diebold2021-04-031-1/+1
| | | | ... since that's the actual method on Chalk side that matches the signature.
* Introduce `GenericArg` like in ChalkFlorian Diebold2021-04-031-7/+10
| | | | | | | Plus some more adaptations to Substitution. Lots of `assert_ty_ref` that we should revisit when introducing lifetime/const parameters.
* Fix box pattern inference panicLukas Wirth2021-03-211-6/+26
|
* clippy::complexity simplifications related to IteratorsMatthias Krüger2021-03-211-1/+1
|
* Rename Substs -> SubstitutionFlorian Diebold2021-03-161-5/+7
|
* Don't use Substs for Ref/Raw/Array/SliceFlorian Diebold2021-03-141-5/+5
|
* Make Ty wrap TyKind in an ArcFlorian Diebold2021-03-141-6/+6
| | | | | | | | ... 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-20/+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-2/+1
|
* Use chalk_ir::AdtIdLukas Wirth2021-03-041-1/+1
|
* Use chalk_ir::MutabilityLukas Wirth2021-03-011-5/+6
|
* Turn Ty::Tuple variant into a tuple-variantLukas Wirth2021-02-281-1/+1
|
* Inline TypeCtor into TyLukas Wirth2021-02-281-15/+12
|
* Implement const pat inferenceLukas Wirth2020-12-231-1/+5
|
* Properly infer tuple struct patterns when encountering ellipsisLukas Wirth2020-11-241-9/+22
|
* Properly infer tuple patterns when encountering ellipsisLukas Wirth2020-11-241-8/+17
|
* Implement box pattern inferenceJonas Schievink2020-09-121-1/+13
|
* Rename record_field_pat to record_pat_fieldPavan Kumar Sunkara2020-09-101-1/+1
|
* Rename ra_hir_ty -> hir_tyAleksey Kladov2020-08-131-0/+241