about summary refs log tree commit diff
path: root/compiler/rustc_middle/src/ty/fold.rs
AgeCommit message (Collapse)AuthorLines
2021-09-28More tracing instrumentationOli Scherer-16/+20
2021-08-26optimize `HasTypeFlagsVisitor`lcnr-33/+81
2021-08-26type flagslcnr-8/+9
2021-08-26reviewlcnr-7/+10
2021-08-26don't just compare `ty::Const`lcnr-0/+40
2021-08-26update `TypeFlags` to deal with missing ct substslcnr-21/+82
2021-08-26make unevaluated const substs optionallcnr-13/+22
2021-08-26require a `tcx` for `TypeVisitor`lcnr-8/+38
2021-07-03Remove `ty::Binder::bind()`Yuki Okushi-82/+0
Co-authored-by: Noah Lev <camelidcamel@gmail.com>
2021-04-08Fix outdated crate names in compiler docspierwill-1/+1
Changes `librustc_X` to `rustc_X`, only in documentation comments. Plain code comments are left unchanged. Also fix incorrect file paths.
2021-04-02Auto merge of #83207 - oli-obk:valtree2, r=lcnrbors-0/+5
normalize mir::Constant differently from ty::Const in preparation for valtrees Valtrees are unable to represent many kind of constant values (this is on purpose). For constants that are used at runtime, we do not need a valtree representation and can thus use a different form of evaluation. In order to make this explicit and less fragile, I added a `fold_constant` method to `TypeFolder` and implemented it for normalization. Normalization can now, when it wants to eagerly evaluate a constant, normalize `mir::Constant` directly into a `mir::ConstantKind::Val` instead of relying on the `ty::Const` evaluation. In the future we can get rid of the `ty::Const` in there entirely and add our own `Unevaluated` variant to `mir::ConstantKind`. This would allow us to remove the `promoted` field from `ty::ConstKind::Unevaluated`, as promoteds can never occur in the type system. cc `@rust-lang/wg-const-eval` r? `@lcnr`
2021-03-31Fmt and test revertJack Huey-6/+8
2021-03-31Fix new problem from rebase and a little cleanupJack Huey-7/+8
2021-03-31Add var to BoundRegion. Add query to get bound vars for applicable items.Jack Huey-22/+141
2021-03-31Track bound varsJack Huey-51/+100
2021-03-31Add tcx lifetime to BinderJack Huey-17/+42
2021-03-31count bound varsJack Huey-0/+48
2021-03-31Add a new normalization query just for mir constantsOli Scherer-0/+5
2021-03-15Make functions passed to BoundVarReplacer be optionalJack Huey-55/+53
2021-02-26Miscellaneous inlining improvementsTomasz Miąsko-0/+7
Inline a few small and hot functions.
2020-12-18Make BoundRegion have a kind of BoungRegionKindJack Huey-33/+24
2020-12-05remove redundant clonesMatthias Krüger-1/+1
2020-11-17Auto merge of #78779 - LeSeulArtichaut:ty-visitor-return, r=oli-obkbors-46/+64
Introduce `TypeVisitor::BreakTy` Implements MCP rust-lang/compiler-team#383. r? `@ghost` cc `@lcnr` `@oli-obk` ~~Blocked on FCP in rust-lang/compiler-team#383.~~
2020-11-16compiler: fold by valueBastian Kauschke-22/+18
2020-11-15Remove dead `TypeFoldable::visit_tys_shallow` methodLeSeulArtichaut-14/+0
2020-11-14Set the default `BreakTy` to `!`LeSeulArtichaut-1/+4
2020-11-14Use `TypeVisitor::BreakTy` in `HasEscapingVarsVisitor`LeSeulArtichaut-4/+11
2020-11-14Use `TypeVisitor::BreakTy` in `HasTypeFlagsVisitor`LeSeulArtichaut-5/+22
2020-11-14Introduce `TypeVisitor::BreakTy`LeSeulArtichaut-24/+29
2020-10-30Auto merge of #78182 - LeSeulArtichaut:ty-visitor-contolflow, r=lcnr,oli-obkbors-47/+70
TypeVisitor: use `std::ops::ControlFlow` instead of `bool` Implements MCP rust-lang/compiler-team#374. Blocked on FCP in rust-lang/compiler-team#374. r? `@lcnr` cc `@jonas-schievink`
2020-10-30Remove implicit `Continue` typeLeSeulArtichaut-33/+27
2020-10-30Use `ControlFlow::is{break,continue}`LeSeulArtichaut-6/+4
2020-10-30TypeVisitor: use `std::ops::ControlFlow` instead of `bool`LeSeulArtichaut-46/+77
2020-10-29Make anonymous binders start at 0Jack Huey-2/+3
2020-10-23move `visit_predicate` into `TypeVisitor`Bastian Kauschke-6/+5
2020-10-14Remove unused code from rustc_middleest31-45/+6
2020-09-18don't take `TyCtxt` by referenceBastian Kauschke-4/+4
2020-09-04ty.flags -> ty.flags()LeSeulArtichaut-3/+8
2020-09-04Change ty.kind to a methodLeSeulArtichaut-3/+3
2020-08-30mv compiler to compiler/mark-0/+1019