aboutsummaryrefslogtreecommitdiff
path: root/crates/hir_ty/src/lower.rs
Commit message (Collapse)AuthorAgeFilesLines
* Use a constructor function for Static lifetimesLukas Wirth2021-04-061-6/+5
|
* Add Lifetime to DynTyLukas Wirth2021-04-061-1/+3
|
* Add Lifetime to TyKind::RefLukas Wirth2021-04-061-2/+4
|
* Fix shifting of binders in FnPointerFlorian Diebold2021-04-051-2/+3
| | | | | | | | | - 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
* Align FnPointer with ChalkFlorian Diebold2021-04-051-5/+5
|
* Binders::wrap_empty -> wrap_empty_bindersFlorian Diebold2021-04-051-3/+5
|
* Rename shift_bound_vars{_out} to align with ChalkFlorian Diebold2021-04-051-9/+9
|
* Get rid of subst_bound_vars usesFlorian Diebold2021-04-051-1/+1
|
* Get rid of some walk_mut usesFlorian Diebold2021-04-051-4/+6
|
* Add Interner parameter to Binders::substituteFlorian Diebold2021-04-051-4/+4
|
* Binders::subst -> substituteFlorian Diebold2021-04-051-4/+4
|
* Use VariableKinds in BindersFlorian Diebold2021-04-051-41/+41
|
* Hide Binders internals moreFlorian Diebold2021-04-051-10/+13
|
* Pass interner to TraitRef::self_type_parameterLaurențiu Nicola2021-04-051-1/+2
|
* Rename TyKind::ForeignType to ForeignLaurențiu Nicola2021-04-051-1/+1
|
* Rename TyKind::Unknown to ErrorLaurențiu Nicola2021-04-051-19/+19
|
* Replace Substitution::type_paramsFlorian Diebold2021-04-041-3/+4
|
* Replace Substitution::bound_vars and ::type_params_for_genericsFlorian Diebold2021-04-041-16/+8
|
* Use TyBuilder in another placeFlorian Diebold2021-04-041-4/+3
|
* Move Ty::builtin to TyBuilderFlorian Diebold2021-04-041-1/+1
|
* Add TyBuilder::adtFlorian Diebold2021-04-041-4/+5
|
* Use bitflags to compress function propertiesJonas Schievink2021-04-031-1/+1
| | | | Very minor savings, only 1 MB or so
* Introduce `GenericArg` like in ChalkFlorian Diebold2021-04-031-8/+9
| | | | | | | Plus some more adaptations to Substitution. Lots of `assert_ty_ref` that we should revisit when introducing lifetime/const parameters.
* Merge #8284bors[bot]2021-04-021-1/+1
|\ | | | | | | | | | | | | | | 8284: Reduce memory usage by using global `Arc`-based interning r=jonas-schievink a=jonas-schievink This saves around 50 mb when running `analysis-stats` on r-a itself. Not a lot, but this infra can be easily reused to intern more stuff. Co-authored-by: Jonas Schievink <[email protected]>
| * Global TypeRef/TraitRef interningJonas Schievink2021-04-011-1/+1
| |
* | Don't allocate in `associated_type_shorthand_candidates`Lukas Wirth2021-04-021-36/+33
| |
* | Resolve associated types with type anchorsLukas Wirth2021-04-011-1/+1
|/
* Remove TraitRef::ErrorLukas Wirth2021-03-291-4/+1
|
* Rename target_ty to self_tyLukas Wirth2021-03-291-1/+1
|
* Lower traits to TraitRef instead of TypeRefLukas Wirth2021-03-291-7/+6
|
* Fix chalk_ir assertionFlorian Diebold2021-03-241-4/+7
| | | | Fixes #8150.
* Correctly lower TraitRefs with default paramsLukas Wirth2021-03-221-8/+17
|
* Use QuantifiedWhereClause in generic_predicates as wellFlorian Diebold2021-03-211-12/+6
| | | | | Still far too much binder skipping going on; I find it hard to imagine this is all correct, but the tests pass.
* Introduce QuantifiedWhereClause and DynTy analogous to ChalkFlorian Diebold2021-03-211-19/+36
| | | | | 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.
* Merge #8133bors[bot]2021-03-211-6/+19
|\ | | | | | | | | | | | | | | | | | | 8133: Ignore type bindings in generic_predicates_for_param (fix panic on ena and crates depending on it) r=flodiebold a=flodiebold This allows us to handle more cases without a query cycle, which includes certain cases that rustc accepted. That in turn means we avoid triggering salsa-rs/salsa#257 on valid code (it will still happen if the user writes an actual cycle). We actually accept more definitions than rustc now; that's because rustc only ignores bindings when looking up super traits, whereas we now also ignore them when looking for predicates to disambiguate associated type shorthand. We could introduce a separate query for super traits if necessary, but for now I think this should be fine. Co-authored-by: Florian Diebold <[email protected]>
| * Ignore type bindings in generic_predicates_for_paramFlorian Diebold2021-03-211-6/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | This allows us to handle more cases without a query cycle, which includes certain cases that rustc accepted. That in turn means we avoid triggering salsa-rs/salsa#257 on valid code (it will still happen if the user writes an actual cycle). We actually accept more definitions than rustc now; that's because rustc only ignores bindings when looking up super traits, whereas we now also ignore them when looking for predicates to disambiguate associated type shorthand. We could introduce a separate query for super traits if necessary, but for now I think this should be fine.
* | remove more redundant clones (clippy::redundant_clone())Matthias Krüger2021-03-211-2/+1
|/
* Remove WhereClause::ErrorFlorian Diebold2021-03-201-5/+2
| | | | | Chalk doesn't have it, and judging from the removed code, it wasn't useful anyway.
* Rename GenericPredicate -> WhereClauseFlorian Diebold2021-03-201-20/+17
|
* Replace Projection variant in GenericPredicate with AliasEqLukas Wirth2021-03-191-5/+5
|
* Chalkify TraitRefFlorian Diebold2021-03-181-11/+11
|
* Rename Substs -> SubstitutionFlorian Diebold2021-03-161-21/+25
|
* Use SmallVec for SubstsFlorian Diebold2021-03-151-4/+5
| | | | | Doesn't help as much as I hoped, but it helps a bit and I also did some refactorings that were necessary anyway.
* Don't use Substs for Ref/Raw/Array/SliceFlorian Diebold2021-03-141-6/+4
|
* 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.
* More renamingFlorian Diebold2021-03-141-2/+5
|
* Use chalk_ir::FnSigFlorian Diebold2021-03-141-2/+2
|
* Rename some fields to their Chalk namesFlorian Diebold2021-03-141-6/+6
|
* Move type lowering methods to TyLoweringContextFlorian Diebold2021-03-131-275/+235
|
* Create TraitEnvironment through a queryFlorian Diebold2021-03-131-44/+44
|