about summary refs log tree commit diff
path: root/compiler/rustc_middle/src/ty/flags.rs
AgeCommit message (Collapse)AuthorLines
2023-12-07add unused `NormalizesTo` predicatelcnr-0/+4
2023-11-24Auto merge of #118189 - compiler-errors:cache-flags-for-const, r=nnethercotebors-5/+10
Cache flags for `ty::Const` Not sure if this has been attempted yet, but worth a shot. It does make the code simpler in `rustc_type_ir`, since we can assume that consts have a `flags` method that is no-cost. r? `@ghost`
2023-11-22Cache flags for ty::ConstMichael Goulet-5/+10
2023-11-21Remove ClosureKind predicate kindMichael Goulet-3/+0
2023-11-13update type flagslcnr-2/+2
- `HAS_RE_LATE_BOUND` -> `HAS_RE_BOUND` - `HAS_TY_LATE_BOUND` -> `HAS_TY_BOUND` - `HAS_CT_LATE_BOUND` -> `HAS_CT_BOUND` - `HAS_LATE_BOUND` -> `HAS_BOUND_VARS` - `fn has_late_bound_regions` -> `fn has_bound_regions` - `fnhas_non_region_late_bound` -> `fn has_non_region_bound_vars` - `fn has_late_bound_vars` -> `fn has_bound_vars`
2023-11-13rename `ReLateBound` to `ReBound`lcnr-1/+1
other changes: - `Region::new_late_bound` -> `Region::new_bound` - `Region::is_late_bound` -> `Region::is_bound`
2023-11-04Make sure that predicates with unmentioned bound vars are still considered ↵Michael Goulet-21/+5
global in the old solver
2023-10-26Replace type flag HAS_TY_GENERATOR with HAS_TY_COROUTINELeón Orell Valerian Liehr-1/+1
2023-10-20s/generator/coroutine/Oli Scherer-1/+1
2023-10-20s/Generator/Coroutine/Oli Scherer-2/+2
2023-09-23Remove GeneratorWitness and rename GeneratorWitnessMIR.Camille GILLOT-5/+1
2023-09-14Properly consider binder vars in HasTypeFlagsVisitorMichael Goulet-15/+21
2023-09-10Implement fallback for effect paramDeadbeef-1/+3
2023-07-14refactor(rustc_middle): Substs -> GenericArgMahdi Dibaiee-31/+31
2023-07-03remove TypeWellFormedFromEnvMichael Goulet-3/+0
2023-06-26TypeWellFormedInEnvMichael Goulet-1/+1
2023-06-19s/Clause/ClauseKindMichael Goulet-7/+10
2023-06-17Move ConstEvaluatable to ClauseMichael Goulet-1/+1
2023-06-17Move WF goal to clauseMichael Goulet-1/+1
2023-06-16Add `AliasKind::Weak` for type aliases.Oli Scherer-1/+1
Only use it when the type alias contains an opaque type. Also does wf-checking on such type aliases.
2023-05-04IAT: Introduce AliasKind::InherentLeón Orell Valerian Liehr-7/+7
2023-04-19small type system cleanuplcnr-4/+4
2023-03-23Rename AliasEq -> AliasRelateMichael Goulet-1/+1
2023-03-23Include relation direction in AliasEq predicateMichael Goulet-1/+1
2023-02-17Add `Clause::ConstArgHasType` variantBoxy-0/+4
2023-02-15simplify some refsMatthias Krüger-1/+1
2023-02-10add `AliasEq` to `PredicateKind`Boxy-4/+12
2023-01-27Introduce GeneratorWitnessMIR.Camille GILLOT-0/+10
2023-01-08Add type flags support for Ty and Const late-bound regionsMichael Goulet-2/+14
2022-12-20rustc: Remove needless lifetimesJeremy Stucki-1/+1
2022-12-18don't restuct references just to reborrowMatthias Krüger-2/+2
2022-12-14Ensure no one constructs `AliasTy`s themselvesOli Scherer-1/+1
2022-12-13Combine projection and opaque into aliasMichael Goulet-2/+2
2022-12-13squash OpaqueTy and ProjectionTy into AliasTyMichael Goulet-2/+2
2022-12-13Use ty::OpaqueTy everywhereMichael Goulet-1/+1
2022-11-27Prefer doc comments over `//`-comments in compilerMaybe Waffle-1/+1
2022-11-25Auto merge of #99798 - JulianKnodt:ac1, r=BoxyUwUbors-0/+20
Add `ConstKind::Expr` Starting to implement `ty::ConstKind::Abstract`, most of the match cases are stubbed out, some I was unsure what to add, others I didn't want to add until a more complete implementation was ready. r? `@lcnr`
2022-11-25Add empty ConstKind::Abstractkadmin-0/+20
Initial pass at expr/abstract const/s Address comments Switch to using a list instead of &[ty::Const], rm `AbstractConst` Remove try_unify_abstract_consts Update comments Add edits Recurse more More edits Prevent equating associated consts Move failing test to ui Changes this test from incremental to ui, and mark it as failing and a known bug. Does not cause the compiler to ICE, so should be ok.
2022-11-25Introduce PredicateKind::ClauseSantiago Pastorino-4/+10
2022-11-21Add an always-ambiguous predicate to make sure that we don't accidentlally ↵Oli Scherer-0/+1
allow trait resolution to prove false things during coherence
2022-10-19stop folding `UnevaluatedConst`lcnr-12/+4
2022-10-18change `ConstEvaluatable` to use `ty::Const`lcnr-1/+1
2022-09-23rename Unevaluated to UnevaluatedConstb-naber-2/+2
2022-09-22introduce mir::Unevaluatedb-naber-1/+1
2022-09-12Plumb dyn trait representation through ty::DynamicEric Holk-1/+1
2022-09-05Pack `Term` in the same way as `GenericArg`.Nicholas Nethercote-7/+7
This shrinks the `PredicateS` type, which is instanted frequently.
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-02-21use `List<Ty<'tcx>>` for tupleslcnr-2/+2
2022-02-15Overhaul `Const`.Nicholas Nethercote-4/+4
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-15Overhaul `TyS` and `Ty`.Nicholas Nethercote-2/+2
Specifically, change `Ty` from this: ``` pub type Ty<'tcx> = &'tcx TyS<'tcx>; ``` to this ``` pub struct Ty<'tcx>(Interned<'tcx, TyS<'tcx>>); ``` There are two benefits to this. - It's now a first class type, so we can define methods on it. This means we can move a lot of methods away from `TyS`, leaving `TyS` as a barely-used type, which is appropriate given that it's not meant to be used directly. - The uniqueness requirement is now explicit, via the `Interned` type. E.g. the pointer-based `Eq` and `Hash` comes from `Interned`, rather than via `TyS`, which wasn't obvious at all. Much of this commit is boring churn. The interesting changes are in these files: - compiler/rustc_middle/src/arena.rs - compiler/rustc_middle/src/mir/visit.rs - compiler/rustc_middle/src/ty/context.rs - compiler/rustc_middle/src/ty/mod.rs Specifically: - Most mentions of `TyS` are removed. It's very much a dumb struct now; `Ty` has all the smarts. - `TyS` now has `crate` visibility instead of `pub`. - `TyS::make_for_test` is removed in favour of the static `BOOL_TY`, which just works better with the new structure. - The `Eq`/`Ord`/`Hash` impls are removed from `TyS`. `Interned`s impls of `Eq`/`Hash` now suffice. `Ord` is now partly on `Interned` (pointer-based, for the `Equal` case) and partly on `TyS` (contents-based, for the other cases). - There are many tedious sigil adjustments, i.e. adding or removing `*` or `&`. They seem to be unavoidable.