about summary refs log tree commit diff
path: root/compiler/rustc_traits/src/chalk/db.rs
AgeCommit message (Collapse)AuthorLines
2023-07-03Remove chalk from the compilerMichael Goulet-796/+0
2023-07-01Update chalkNilstrieb-0/+2
2023-06-26Migrate predicates_of and caller_bounds to ClauseMichael Goulet-1/+1
2023-06-22Migrate item_bounds to ty::ClauseMichael Goulet-2/+4
2023-05-29Rename `tcx.mk_re_*` => `Region::new_*`Maybe Waffle-1/+1
2023-05-28Make EarlyBinder's inner value private; and fix all of the resulting errorsKyle Matsuda-1/+1
2023-04-21Changes from reviewKyle Matsuda-11/+6
2023-04-20add EarlyBinder to output of explicit_item_bounds; replace ↵Kyle Matsuda-2/+2
bound_explicit_item_bounds usages; remove bound_explicit_item_bounds query
2023-04-06Remove index from BrAnonJack Huey-1/+1
2023-02-22Remove type-traversal trait aliasesAlan Egerton-2/+2
2023-02-16remove bound_type_of query; make type_of return EarlyBinder; change type_of ↵Kyle Matsuda-3/+3
in metadata
2023-02-16change usages of type_of to bound_type_ofKyle Matsuda-2/+2
2023-02-15Add specialized variants of `mk_region`.Nicholas Nethercote-1/+1
Much like there are specialized variants of `mk_ty`. This will enable some optimization in the next commit. Also rename the existing `re_error*` functions as `mk_re_error*`, for consistency.
2023-02-13Rename folder traits' `tcx` method to `interner`Alan Egerton-1/+1
2023-02-13Make folding traits generic over the InternerAlan Egerton-1/+1
2023-02-13Alias folding/visiting traits instead of re-exportAlan Egerton-1/+1
2023-02-13Reduce direct `mk_ty` usage.Nicholas Nethercote-10/+6
We use more specific `mk_*` functions in most places, might as well use them as much as possible.
2023-01-30Track bound types like bound regionsMichael Goulet-1/+1
2023-01-28Rename `is_object_safe` to `check_is_object_safe` to hint side effectsGary Guo-1/+1
2023-01-26change fn_sig query to use EarlyBinder; remove bound_fn_sig query; add ↵Kyle Matsuda-1/+1
EarlyBinder to fn_sig in metadata
2023-01-15Remove bound_{explicit,}_item_boundsMichael Goulet-8/+7
2023-01-14change impl_trait_ref query to return EarlyBinder; remove ↵Kyle Matsuda-4/+3
bound_impl_trait_ref query; add EarlyBinder to impl_trait_ref in metadata
2023-01-14change usages of impl_trait_ref to bound_impl_trait_refKyle Matsuda-1/+2
2022-12-20rustc: Remove needless lifetimesJeremy Stucki-1/+1
2022-12-14Ensure no one constructs `AliasTy`s themselvesOli Scherer-2/+2
2022-12-13Combine projection and opaque into aliasMichael Goulet-4/+5
2022-12-13squash OpaqueTy and ProjectionTy into AliasTyMichael Goulet-2/+2
2022-12-13Use ty::OpaqueTy everywhereMichael Goulet-2/+4
2022-11-24move some layout logic to rustc_target::abi::layouthkalbasi-15/+15
2022-11-13Make rustc build with new chalkMichael Goulet-0/+3
2022-11-07Add an optional Span to BrAnon and use it to print better error for HRTB ↵Jack Huey-1/+1
error from generator interior
2022-11-04Refactor tcx mk_const parameters.Mateusz-4/+4
2022-09-19remove the `Subst` trait, always use `EarlyBinder`lcnr-1/+1
2022-08-02Add bound_predicates_of and bound_explicit_predicates_ofJack Huey-15/+16
2022-08-01Remove DefId from AssocItemContainer.Camille GILLOT-5/+3
2022-06-14Rename the `ConstS::val` field as `kind`.Nicholas Nethercote-1/+1
And likewise for the `Const::val` method. Because its type is called `ConstKind`. Also `val` is a confusing name because `ConstKind` is an enum with seven variants, one of which is called `Value`. Also, this gives consistency with `TyS` and `PredicateS` which have `kind` fields. The commit also renames a few `Const` variables from `val` to `c`, to avoid confusion with the `ConstKind::Value` variant.
2022-06-08Folding revamp.Nicholas Nethercote-1/+1
This commit makes type folding more like the way chalk does it. Currently, `TypeFoldable` has `fold_with` and `super_fold_with` methods. - `fold_with` is the standard entry point, and defaults to calling `super_fold_with`. - `super_fold_with` does the actual work of traversing a type. - For a few types of interest (`Ty`, `Region`, etc.) `fold_with` instead calls into a `TypeFolder`, which can then call back into `super_fold_with`. With the new approach, `TypeFoldable` has `fold_with` and `TypeSuperFoldable` has `super_fold_with`. - `fold_with` is still the standard entry point, *and* it does the actual work of traversing a type, for all types except types of interest. - `super_fold_with` is only implemented for the types of interest. Benefits of the new model. - I find it easier to understand. The distinction between types of interest and other types is clearer, and `super_fold_with` doesn't exist for most types. - With the current model is easy to get confused and implement a `super_fold_with` method that should be left defaulted. (Some of the precursor commits fixed such cases.) - With the current model it's easy to call `super_fold_with` within `TypeFolder` impls where `fold_with` should be called. The new approach makes this mistake impossible, and this commit fixes a number of such cases. - It's potentially faster, because it avoids the `fold_with` -> `super_fold_with` call in all cases except types of interest. A lot of the time the compile would inline those away, but not necessarily always.
2022-05-13Add bound_impl_trait_refJack Huey-5/+5
2022-05-13Add bound_type_ofJack Huey-1/+4
2022-05-10Introduce EarlyBinderJack Huey-13/+14
2022-03-23make rustc work againMichael Goulet-10/+37
2022-03-11Improve `AdtDef` interning.Nicholas Nethercote-9/+9
This commit makes `AdtDef` use `Interned`. Much the commit is tedious changes to introduce getter functions. The interesting changes are in `compiler/rustc_middle/src/ty/adt.rs`.
2022-02-22chalk/db: use correct debrujin index when replacing opaque type.Dario Nieuwenhuis-15/+40
2022-02-21use `List<Ty<'tcx>>` for tupleslcnr-1/+1
2022-02-19Adopt let else in more placesest31-3/+2
2022-02-15Overhaul `Const`.Nicholas Nethercote-2/+2
Specifically, rename the `Const` struct as `ConstS` and re-introduce `Const` as this: ``` pub struct Const<'tcx>(&'tcx Interned<ConstS>); ``` This now matches `Ty` and `Predicate` more closely, including using pointer-based `eq` and `hash`. Notable changes: - `mk_const` now takes a `ConstS`. - `Const` was copy, despite being 48 bytes. Now `ConstS` is not, so need a we need separate arena for it, because we can't use the `Dropless` one any more. - Many `&'tcx Const<'tcx>`/`&Const<'tcx>` to `Const<'tcx>` changes - Many `ct.ty` to `ct.ty()` and `ct.val` to `ct.val()` changes. - Lots of tedious sigil fiddling.
2022-02-15Remove unnecessary `RegionKind::` quals.Nicholas Nethercote-1/+1
The variant names are exported, so we can use them directly (possibly with a `ty::` qualifier). Lots of places already do this, this commit just increases consistency.
2022-02-11Fix more chalk lowering issuesMatthew Jasper-15/+5
- Implement lowering for subtype goals - Use correct lang item for Generator trait - Use `lower_into` for lowering `ty::Variance`
2022-02-11Stop using a placeholder for empty regions in ChalkMatthew Jasper-11/+1
2022-01-07Add `trait_item_def_id` to `AssocItem`Matthew Jasper-13/+3
This allows avoiding some lookups by name