about summary refs log tree commit diff
path: root/compiler/rustc_middle/src/infer
AgeCommit message (Collapse)AuthorLines
2022-03-28Revert "Auto merge of #93893 - oli-obk:sad_revert, r=oli-obk"Oli Scherer-0/+6
This reverts commit 6499c5e7fc173a3f55b7a3bd1e6a50e9edef782d, reversing changes made to 78450d2d602b06d9b94349aaf8cece1a4acaf3a8.
2022-02-15Inline UnifyKey::index and UnifyKey::from_indexTomasz Miąsko-0/+4
2022-02-15Overhaul `Const`.Nicholas Nethercote-10/+10
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-11Renumber universes when canonicalizing for ChalkMatthew Jasper-3/+3
This is required to avoid creating large numbers of universes from each Chalk query, while still having enough universe information for lifetime errors.
2022-02-11Revert "Auto merge of #92007 - oli-obk:lazy_tait2, r=nikomatsakis"Oli Scherer-6/+0
This reverts commit e7cc3bddbe0d0e374d05e7003e662bba1742dbae, reversing changes made to 734368a200904ef9c21db86c595dc04263c87be0.
2022-02-03Clean up opaque type obligations in query resultsOli Scherer-4/+7
2022-02-02Clean up leftovers from eager hidden type mergingOli Scherer-1/+1
2022-02-02Lazily resolve type-alias-impl-trait defining usesOli Scherer-1/+4
by using an opaque type obligation to bubble up comparisons between opaque types and other types Also uses proper obligation causes so that the body id works, because out of some reason nll uses body ids for logic instead of just diagnostics.
2022-01-12Canonicalize const variables correctlyMichael Goulet-4/+4
2021-12-15Remove `in_band_lifetimes` from `rustc_middle`Aaron Hill-2/+2
See #91867 This was mostly straightforward. In several places, I take advantage of the fact that lifetimes are non-hygenic: a macro declares the 'tcx' lifetime, which is then used in types passed in as macro arguments.
2021-12-12Remap more env constness for queriesDeadbeef-0/+8
2021-06-02Miscellaneous inlining improvementsTomasz Miąsko-0/+1
2021-05-15Add commentJack Huey-0/+3
2021-05-14Store Option<Region> as value for RegionVidJack Huey-22/+30
2021-05-14Make the UnifyValue for RegionVid ()Jack Huey-1/+1
2021-03-31Add var to BoundRegion. Add query to get bound vars for applicable items.Jack Huey-1/+2
2021-03-31Add tcx lifetime to BinderJack Huey-1/+1
2021-03-27Remove (lots of) dead codeJoshua Nelson-15/+0
Found with https://github.com/est31/warnalyzer. Dubious changes: - Is anyone else using rustc_apfloat? I feel weird completely deleting x87 support. - Maybe some of the dead code in rustc_data_structures, in case someone wants to use it in the future? - Don't change rustc_serialize I plan to scrap most of the json module in the near future (see https://github.com/rust-lang/compiler-team/issues/418) and fixing the tests needed more work than I expected. TODO: check if any of the comments on the deleted code should be kept.
2021-03-26Use iter::zip in compiler/Josh Stone-4/+2
2021-01-18Move a few more types to `rustc_type_ir`LeSeulArtichaut-50/+3
2020-12-18Make BoundRegion have a kind of BoungRegionKindJack Huey-3/+4
2020-11-16wordslcnr-2/+2
2020-11-12Add type to `ConstKind::Placeholder`varkor-10/+12
2020-10-23reviewBastian Kauschke-12/+9
2020-10-22improve const infer errorBastian Kauschke-11/+5
2020-09-23use relevant span when unifying `ConstVarValue`sBastian Kauschke-7/+7
2020-09-23merge `need_type_info_err(_const)`Bastian Kauschke-2/+2
2020-09-14improve const infer errBastian Kauschke-0/+1
2020-08-30mv compiler to compiler/mark-0/+620