about summary refs log tree commit diff
path: root/src/librustc/infer/resolve.rs
AgeCommit message (Collapse)AuthorLines
2020-02-16Move librustc/{traits,infer} to librustc_infer.Camille GILLOT-244/+0
2020-02-10Reduce the number of `RefCell`s in `InferCtxt`.Nicholas Nethercote-4/+7
`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.
2019-12-22Format the worldMark Rousskov-23/+20
2019-12-14Indicate origin of where type parameter for uninferred typesOhad Ravid-1/+1
2019-11-12Create intermediate enum ty::ConstKind.Camille GILLOT-3/+2
2019-10-20Fix resolve_type_vars_with_obligations not resolving const inferenceben-3/+3
variables.
2019-09-25Rename `sty` to `kind`varkor-2/+2
2019-06-18rustc: remove 'x: 'y bounds (except from comments/strings).Eduard-Mihai Burtescu-4/+4
2019-06-14Run `rustfmt --file-lines ...` for changes from previous commits.Eduard-Mihai Burtescu-4/+4
2019-06-14Unify all uses of 'gcx and 'tcx.Eduard-Mihai Burtescu-22/+22
2019-06-12rustc: replace `TyCtxt<'tcx, 'gcx, 'tcx>` with `TyCtxt<'gcx, 'tcx>`.Eduard-Mihai Burtescu-3/+3
2019-06-12rustc: replace `TyCtxt<'a, 'gcx, 'tcx>` with `TyCtxt<'tcx, 'gcx, 'tcx>`.Eduard-Mihai Burtescu-3/+3
2019-06-05Refactor `ConstVariableOrigin` into `ConstVariableOrigin` and ↵varkor-3/+6
`ConstVariableOriginKind`
2019-05-28Fix nitsvarkor-2/+2
2019-05-28Rename `OpportunisticTypeResolver` to `OpportunisticVarResolver`varkor-7/+7
2019-05-28Resolve consts in OpportunisticTypeResolvervarkor-3/+12
2019-05-01Split `ct_err` out into `CommonConsts`varkor-1/+1
Co-Authored-By: Gabriel Smith <yodaldevoid@users.noreply.github.com>
2019-05-01Create ShallowResolvervarkor-7/+7
Co-Authored-By: Gabriel Smith <yodaldevoid@users.noreply.github.com>
2019-05-01Fix rebase from LazyConst removalvarkor-14/+9
2019-05-01Handle generic consts in relate and infervarkor-8/+44
Co-Authored-By: Gabriel Smith <yodaldevoid@users.noreply.github.com>
2019-04-25Improved error message when type must be bound due to generator.Giles Cope-9/+27
Error now mentions type var name and span is highlighted.
2019-02-05move librustc to 2018Mark Mansi-2/+2
2018-12-25Remove licensesMark Rousskov-10/+0
2018-11-29Add inline attributes and add unit to CommonTypesJohn Kåre Alsaker-0/+1
2018-11-06refactor: use shorthand fieldsteresy-2/+2
2018-09-29rustc/infer: readability improvementsljedrz-2/+2
2018-08-22Remove Ty prefix from ↵varkor-5/+5
Ty{Adt|Array|Slice|RawPtr|Ref|FnDef|FnPtr|Dynamic|Closure|Generator|GeneratorWitness|Never|Tuple|Projection|Anon|Infer|Error}
2018-03-14remove defaulting to unitAndrew Cann-6/+0
Types will no longer default to `()`, instead always defaulting to `!`. This disables the associated warning and removes the flag from TyTuple
2017-11-16make the `region_constraints` field an `Option`Niko Matsakis-2/+2
This way, we can `take()` ownership of it when we are going to resolve regions.
2017-11-16infer: rename `region_vars` field to `region_constraints`Niko Matsakis-1/+2
2017-11-16move refcells out from `RegionVarBindings` and up into `InferCtxt`Niko Matsakis-2/+4
2017-11-16extract the `tcx` out from `RegionVarBindings`Niko Matsakis-1/+1
2017-11-16extract storage of region values from `RegionVarBindings`Niko Matsakis-1/+5
2017-09-02limit and clear cache obligations opportunisticallyNiko Matsakis-1/+38
Keep **all** the obligations for every projection is wasteful of memory and compilation time. We only really care about those subobligations that may inform the result of the projection (i.e., may help to resolve any inference variables that appear within). Therefore, we can clear the subobligations from the cache that don't potentially affect the result of the projection. On every cache hit, we also take the opportunity to check if the type variables have been resolved *yet* and, if so, clear out the pending obligations. Fixes #43613
2017-08-15Fix typos & us spellingsFourchaux-1/+1
2017-08-14remove the "defaulted unit" type bit during writebackAriel Ben-Yehuda-1/+9
The defaulted unit bit is only relevant for the surrounding inference context, and can cause trouble, including spurious lints and ICEs, outside of it. Fixes #43853.
2017-04-30intern CodeExtentsNiko Matsakis-2/+2
Make a `CodeExtent<'tcx>` be something allocated in an arena instead of an index into the `RegionMaps`.
2016-08-27rustc: pass ty::Region behind an interned 'tcx reference.Eduard Burtescu-8/+8
2016-05-11rustc: Generalize a minimum set of functions over 'tcx != 'gcx.Eduard Burtescu-12/+13
2016-05-11rustc: Split 'tcx into 'gcx and 'tcx for InferCtxt and its users.Eduard Burtescu-17/+18
2016-05-11rustc: Replace &'a TyCtxt<'tcx> with a TyCtxt<'a, 'tcx> wrapper.Eduard Burtescu-3/+3
2016-03-31librustc: replace tcx.sess.bug calls with bug!()Benjamin Herr-3/+1
2016-03-27rustc: move cfg, infer, traits and ty from middle to top-level.Eduard Burtescu-0/+147