about summary refs log tree commit diff
path: root/src/librustc/infer/freshen.rs
AgeCommit message (Collapse)AuthorLines
2020-02-16Move librustc/{traits,infer} to librustc_infer.Camille GILLOT-266/+0
2020-02-10Reduce the number of `RefCell`s in `InferCtxt`.Nicholas Nethercote-5/+13
`InferCtxt` contains six structures within `RefCell`s. Every time we create and dispose of (commit or rollback) a snapshot we have to `borrow_mut` each one of them. This commit moves the six structures under a single `RefCell`, which gives significant speed-ups by reducing the number of `borrow_mut` calls. To avoid runtime errors I had to reduce the lifetimes of dynamic borrows in a couple of places.
2020-02-06index ReEmpty by universeNiko Matsakis-1/+1
We now make `'empty` indexed by a universe index, resulting in a region lattice like this: ``` static ----------+-----...------+ (greatest) | | | early-bound and | | free regions | | | | | scope regions | | | | | empty(root) placeholder(U1) | | / | | / placeholder(Un) empty(U1) -- / | / ... / | / empty(Un) -------- (smallest) ``` Therefore, `exists<A> { forall<B> { B: A } }` is now unprovable, because A must be at least Empty(U1) and B is placeholder(U2), and hence the two regions are unrelated.
2020-01-04canonicalize FxHash{Map,Set} importsMazdak Farrokhzad-1/+2
2019-12-22Format the worldMark Rousskov-81/+72
2019-11-12Create intermediate enum ty::ConstKind.Camille GILLOT-10/+7
2019-10-21Rename `ConstValue::Infer(InferConst::Canonical(..))` to `ConstValue::Bound(..)`varkor-1/+1
2019-09-25Rename `sty` to `kind`varkor-1/+1
2019-06-19Change `ByRef` to a struct variant to clarify its fields via namesOliver Scherer-1/+1
2019-06-18rustc: remove 'x: 'y bounds (except from comments/strings).Eduard-Mihai Burtescu-1/+1
2019-06-14Run `rustfmt --file-lines ...` for changes from previous commits.Eduard-Mihai Burtescu-2/+1
2019-06-14Unify all uses of 'gcx and 'tcx.Eduard-Mihai Burtescu-7/+7
2019-06-12rustc: replace `TyCtxt<'tcx, 'gcx, 'tcx>` with `TyCtxt<'gcx, 'tcx>`.Eduard-Mihai Burtescu-1/+1
2019-06-12rustc: replace `TyCtxt<'a, 'gcx, 'tcx>` with `TyCtxt<'tcx, 'gcx, 'tcx>`.Eduard-Mihai Burtescu-1/+1
2019-05-25Make `ConstValue::Slice` solely take `[u8]` and `str`Oliver Scherer-1/+1
2019-05-01Fix rebase from LazyConst removalvarkor-37/+36
2019-05-01Replace ConstVariableTable with UnificationTablevarkor-1/+2
2019-05-01Add `ConstValue::Placeholder`varkor-1/+2
2019-05-01impl fold_const for TypeFreshenerGabriel Smith-22/+92
Signed-off-by: Gabriel Smith <ga29smith@gmail.com>
2019-05-01Rename mk_infer to mk_ty_inferGabriel Smith-1/+1
Signed-off-by: Gabriel Smith <ga29smith@gmail.com>
2019-05-01Add stubs for `fold_const`varkor-0/+4
Co-Authored-By: Gabriel Smith <yodaldevoid@users.noreply.github.com>
2019-04-25Update existing usagesvarkor-1/+1
2019-02-05move librustc to 2018Mark Mansi-3/+3
2018-12-25Remove licensesMark Rousskov-10/+0
2018-11-24Introduce `TyKind::Placeholder` variantscalexm-3/+3
2018-11-03Remove `ReCanonical` in favor of `ReLateBound`scalexm-1/+0
2018-11-03Move `BoundTy` to `ty::TyKind`scalexm-2/+2
2018-10-20Rename InferTy::CanonicalTy to BoundTy and add DebruijnIndex to variant typeFabian Drinck-1/+1
2018-10-19Prefer `Default::default` over `FxHash*::default` in struct constructorsOliver Scherer-1/+1
2018-10-19Deprecate the `FxHashMap()` and `FxHashSet()` constructor function hackOliver Scherer-1/+1
2018-10-04rename skolemized to placeholderNiko Matsakis-1/+1
2018-10-03Introduce `TyKind::UnnormalizedProjection`scalexm-0/+1
2018-09-05Changing TyAnon -> TyOpaque and relevant functionsms2300-1/+1
2018-08-22Remove Ty prefix from Ty{Bool|Char|Int|Uint|Float|Str}varkor-6/+6
2018-08-22Remove Ty prefix from Ty{Foreign|Param}varkor-2/+2
2018-08-22Remove Ty prefix from ↵varkor-23/+23
Ty{Adt|Array|Slice|RawPtr|Ref|FnDef|FnPtr|Dynamic|Closure|Generator|GeneratorWitness|Never|Tuple|Projection|Anon|Infer|Error}
2018-03-13add `canonicalize` method to `InferCtxt` [VIC]Niko Matsakis-1/+5
2018-03-01have `probe()` return `TypeVariableValue`Niko Matsakis-1/+1
2018-03-01obtain `UnificationTable` and `snapshot_vec` from `ena` insteadNiko Matsakis-2/+2
The ena version has an improved interface. I suspect `librustc_data_structures` should start migrating out to crates.io in general.
2018-01-23Adds support for immovable generators. Move checking of invalid borrows ↵John Kåre Alsaker-0/+1
across suspension points to borrowck. Fixes #44197, #45259 and #45093.
2017-12-15add a new RegionKind variant: ReClosureBoundNiko Matsakis-0/+7
This is needed to allow the `ClosureRegionRequirements` to capture types that include regions.
2017-11-18remove the `generator_sigs` map, query, and plumbingNiko Matsakis-106/+1
2017-11-18`TyClosure` no longer needs to use `freshen_closure_like`Niko Matsakis-13/+3
All the data is now part of its type.
2017-11-18make `mk_closure` take a `ClosureSubsts`Niko Matsakis-1/+1
2017-11-18thread the closure-kind through in the closure substsNiko Matsakis-15/+1
Similar to how freshen handled things, but "always happening"; we can thus remove the corresponding code from `freshen`.
2017-10-27Implement RFC 1861: Extern typesPaul Lietar-0/+1
2017-08-29Track closure signatures & kinds in freshened typesAriel Ben-Yehuda-4/+146
This allows caching closure signatures and kinds in the normal selection and evaluation caches, and fixes the exponential worst-case in @remram44's example, which is a part of #43787. This improvement is complenentary to #43999 - they fix different cases.
2017-07-28Generator literal supportJohn Kåre Alsaker-0/+1
2017-07-05use field init shorthand in src/librustcZack M. Davis-1/+1
The field init shorthand syntax was stabilized in 1.17.0 (aebd94f); we are now free to use it in the compiler.
2017-05-13rustc: treat ReEarlyBound as free without replacing it with ReFree.Eduard-Mihai Burtescu-1/+1