about summary refs log tree commit diff
path: root/compiler/rustc_traits/src/chalk/lowering.rs
AgeCommit message (Collapse)AuthorLines
2023-07-03Remove chalk from the compilerMichael Goulet-1234/+0
2023-06-26TypeWellFormedInEnvMichael Goulet-8/+9
2023-06-26Migrate predicates_of and caller_bounds to ClauseMichael Goulet-38/+25
2023-06-19s/Clause/ClauseKindMichael Goulet-28/+28
2023-06-17Move ConstEvaluatable to ClauseMichael Goulet-4/+4
2023-06-17Move WF goal to clauseMichael Goulet-4/+4
2023-06-16Add `AliasKind::Weak` for type aliases.Oli Scherer-0/+1
Only use it when the type alias contains an opaque type. Also does wf-checking on such type aliases.
2023-05-29Rename `tcx.mk_re_*` => `Region::new_*`Maybe Waffle-10/+14
2023-05-25Pull out logic from #111131, plus some new logic in ↵Michael Goulet-1/+1
EvalCtxt::normalize_opaque_type Co-authored-by: lcnr <rust@lcnr.de>
2023-05-04IAT: Introduce AliasKind::InherentLeón Orell Valerian Liehr-0/+1
2023-04-18Don't transmute `&List<GenericArg>` <-> `&List<Ty>`Maybe Waffle-4/+16
2023-04-16Remove `TypeSuper{Foldable,Visitable}` impls for `Region`.Nicholas Nethercote-4/+4
These traits exist so that folders/visitors can recurse into types of interest: binders, types, regions, predicates, and consts. But `Region` is non-recursive and cannot contain other types of interest, so its methods in these traits are trivial. This commit inlines and removes those trivial methods.
2023-04-06Remove u32 on BoundTyKind::AnonJack Huey-5/+5
2023-04-06Remove index from BrAnonJack Huey-9/+10
2023-04-06Remove expect_anon and expect_anon_placeholder in favor of varJack Huey-9/+7
2023-04-06Use BoundTy and BoundRegion instead of kind of PlaceholderTy and ↵Jack Huey-13/+26
PlaceholderRegion
2023-04-01fix clippy::iter_kv_mapMatthias Krüger-2/+1
2023-03-23Rename AliasEq -> AliasRelateMichael Goulet-4/+4
2023-02-24Rename `mk_{ty,region}` as `mk_{ty,region}_from_kind`.Nicholas Nethercote-1/+1
To discourage accidental use -- there are more specific `mk_*` functions for all `Ty` and `Region` kinds.
2023-02-24Rename many interner functions.Nicholas Nethercote-1/+3
(This is a large commit. The changes to `compiler/rustc_middle/src/ty/context.rs` are the most important ones.) The current naming scheme is a mess, with a mix of `_intern_`, `intern_` and `mk_` prefixes, with little consistency. In particular, in many cases it's easy to use an iterator interner when a (preferable) slice interner is available. The guiding principles of the new naming system: - No `_intern_` prefixes. - The `intern_` prefix is for internal operations. - The `mk_` prefix is for external operations. - For cases where there is a slice interner and an iterator interner, the former is `mk_foo` and the latter is `mk_foo_from_iter`. Also, `slice_interners!` and `direct_interners!` can now be `pub` or non-`pub`, which helps enforce the internal/external operations division. It's not perfect, but I think it's a clear improvement. The following lists show everything that was renamed. slice_interners - const_list - mk_const_list -> mk_const_list_from_iter - intern_const_list -> mk_const_list - substs - mk_substs -> mk_substs_from_iter - intern_substs -> mk_substs - check_substs -> check_and_mk_substs (this is a weird one) - canonical_var_infos - intern_canonical_var_infos -> mk_canonical_var_infos - poly_existential_predicates - mk_poly_existential_predicates -> mk_poly_existential_predicates_from_iter - intern_poly_existential_predicates -> mk_poly_existential_predicates - _intern_poly_existential_predicates -> intern_poly_existential_predicates - predicates - mk_predicates -> mk_predicates_from_iter - intern_predicates -> mk_predicates - _intern_predicates -> intern_predicates - projs - intern_projs -> mk_projs - place_elems - mk_place_elems -> mk_place_elems_from_iter - intern_place_elems -> mk_place_elems - bound_variable_kinds - mk_bound_variable_kinds -> mk_bound_variable_kinds_from_iter - intern_bound_variable_kinds -> mk_bound_variable_kinds direct_interners - region - intern_region (unchanged) - const - mk_const_internal -> intern_const - const_allocation - intern_const_alloc -> mk_const_alloc - layout - intern_layout -> mk_layout - adt_def - intern_adt_def -> mk_adt_def_from_data (unusual case, hard to avoid) - alloc_adt_def(!) -> mk_adt_def - external_constraints - intern_external_constraints -> mk_external_constraints Other - type_list - mk_type_list -> mk_type_list_from_iter - intern_type_list -> mk_type_list - tup - mk_tup -> mk_tup_from_iter - intern_tup -> mk_tup
2023-02-22Rename ty_error_with_guaranteed to ty_error, ty_error to ty_error_miscMichael Goulet-1/+1
2023-02-22Remove type-traversal trait aliasesAlan Egerton-7/+12
2023-02-17Add `Clause::ConstArgHasType` variantBoxy-0/+4
2023-02-15Add specialized variants of `mk_region`.Nicholas Nethercote-10/+10
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-3/+3
2023-02-13Make folding traits generic over the InternerAlan Egerton-3/+3
2023-02-13Make visiting traits generic over the InternerAlan Egerton-2/+2
2023-02-13Alias folding/visiting traits instead of re-exportAlan Egerton-2/+3
2023-02-13Reduce direct `mk_ty` usage.Nicholas Nethercote-7/+7
We use more specific `mk_*` functions in most places, might as well use them as much as possible.
2023-02-11Auto merge of #107507 - BoxyUwU:deferred_projection_equality, r=lcnrbors-0/+4
Implement `deferred_projection_equality` for erica solver Somewhat of a revival of #96912. When relating projections now emit an `AliasEq` obligation instead of attempting to determine equality of projections that may not be as normalized as possible (i.e. because of lazy norm, or just containing inference variables that prevent us from resolving an impl). Only do this when the new solver is enabled
2023-02-10add `AliasEq` to `PredicateKind`Boxy-0/+4
2023-02-09Change to `ReError(ErrorGuaranteed)`Esteban Küber-1/+1
2023-02-09Introduce `ReError`Esteban Küber-0/+3
CC #69314
2023-01-30Track bound types like bound regionsMichael Goulet-19/+21
2023-01-27Introduce GeneratorWitnessMIR.Camille GILLOT-0/+1
2022-12-14Ensure no one constructs `AliasTy`s themselvesOli Scherer-12/+12
2022-12-13Remove chalk lowering for AliasTyMichael Goulet-11/+10
2022-12-13Combine projection and opaque into aliasMichael Goulet-18/+24
2022-12-13squash OpaqueTy and ProjectionTy into AliasTyMichael Goulet-6/+6
2022-12-13ProjectionTy.item_def_id -> ProjectionTy.def_idMichael Goulet-5/+5
2022-12-13Use ty::OpaqueTy everywhereMichael Goulet-7/+9
2022-11-25Introduce PredicateKind::ClauseSantiago Pastorino-38/+50
2022-11-24Avoid `GenFuture` shim when compiling async constructsArpad Borsos-1/+5
Previously, async constructs would be lowered to "normal" generators, with an additional `from_generator` / `GenFuture` shim in between to convert from `Generator` to `Future`. The compiler will now special-case these generators internally so that async constructs will *directly* implement `Future` without the need to go through the `from_generator` / `GenFuture` shim. The primary motivation for this change was hiding this implementation detail in stack traces and debuginfo, but it can in theory also help the optimizer as there is less abstractions to see through.
2022-11-22Rollup merge of #103488 - oli-obk:impl_trait_for_tait, r=lcnrManish Goregaokar-0/+4
Allow opaque types in trait impl headers and rely on coherence to reject unsound cases r? ````@lcnr```` fixes #99840
2022-11-21Allow iterators instead of requiring slices that will get turned into iteratorsOli Scherer-1/+1
2022-11-21Add an always-ambiguous predicate to make sure that we don't accidentlally ↵Oli Scherer-0/+4
allow trait resolution to prove false things during coherence
2022-11-19drive-by: PolyExistentialPredicateMichael Goulet-1/+1
2022-11-13Make rustc build with new chalkMichael Goulet-3/+0
2022-11-07Add an optional Span to BrAnon and use it to print better error for HRTB ↵Jack Huey-9/+11
error from generator interior
2022-11-04Refactor tcx mk_const parameters.Mateusz-1/+1