about summary refs log tree commit diff
path: root/src/librustc/ty
AgeCommit message (Collapse)AuthorLines
2019-05-05rustc: replace uses of with_freevars with the freevars query.Eduard-Mihai Burtescu-15/+3
2019-05-05Auto merge of #60525 - eddyb:namespaces-not-kinds, r=petrochenkovbors-21/+14
rustc: collapse relevant DefPathData variants into {Type,Value,Macro,Lifetime}Ns. `DefPathData` was meant to disambiguate within each namespace, but over the years, that purpose was overlooked, and it started to serve a double-role as a sort of `DefKind` (which #60462 properly adds). Now, we can go back to *only* categorizing namespaces (at least for the variants with names in them). r? @petrochenkov or @nikomatsakis cc @michaelwoerister
2019-05-04Improve subst error when parameter kinds mismatchvarkor-13/+40
2019-05-04removing param_env from pointee_info_atSaleem Jaffer-5/+2
2019-05-04resolving conflictsSaleem Jaffer-4/+3
2019-05-04adding HasParamEnv traitSaleem Jaffer-10/+12
2019-05-04adding is_freeze to TyLayoutMethodsSaleem Jaffer-0/+8
2019-05-04removing map_same from MaybeResultSaleem Jaffer-25/+19
2019-05-04add to_result to ty::MaybeResultSaleem Jaffer-8/+15
2019-05-04resolving conflictsSaleem Jaffer-22/+23
2019-05-04Make line fit within 100 character limit.Daan de Graaf-1/+2
2019-05-04Add param_env parameter to pointee_info_at.Daan de Graaf-2/+5
An associated type ParamEnv has been added to TyLayoutMethods to facilitate this.
2019-05-04Return instead of collecting to mut result.Daan de Graaf-8/+12
2019-05-04Fix typo in src/librustc/ty/layout.rsOliver Scherer-1/+1
Co-Authored-By: wildarch <daandegraaf9@gmail.com>
2019-05-04Move pointee_info_at to TyLayoutMethods.Daan de Graaf-0/+127
The original implementation is still present at librustc_codegen_llvm/abi.rs, should be removed later to prevent code duplication.
2019-05-04Auto merge of #59897 - tmandry:variantful-generators, r=eddybbors-40/+199
Multi-variant layouts for generators This allows generators to overlap fields using variants, but doesn't do any such overlapping yet. It creates one variant for every state of the generator (unresumed, returned, panicked, plus one for every yield), and puts every stored local in each of the yield-point variants. Required for optimizing generator layouts (#52924). There was quite a lot of refactoring needed for this change. I've done my best in later commits to eliminate assumptions in the code that only certain kinds of types are multi-variant, and to centralize knowledge of the inner mechanics of generators in as few places as possible. This change also emits debuginfo about the fields contained in each variant, as well as preserving debuginfo about stored locals while running in the generator. Also, fixes #59972. Future work: - Use this change for an optimization pass that actually overlaps locals within the generator struct (#52924) - In the type layout fields, don't include locals that are uninitialized for a particular variant, so miri and UB sanitizers can check our memory (see https://github.com/rust-lang/rust/issues/59972#issuecomment-483058172) - Preserve debuginfo scopes across generator yield points
2019-05-03Address review commentsTyler Mandry-13/+17
2019-05-04rustc: rename DefPathData::{MacroDef,LifetimeParam} to {Macro,Lifetime}Ns.Eduard-Mihai Burtescu-5/+9
2019-05-04rustc: collapse relevant DefPathData variants into ValueNs.Eduard-Mihai Burtescu-2/+0
2019-05-04rustc: collapse relevant DefPathData variants into TypeNs.Eduard-Mihai Burtescu-13/+4
2019-05-03Split out debuginfo from type info in MIR GeneratorLayoutTyler Mandry-4/+7
2019-05-03rustc: rename hir::def::Def to Res (short for "resolution").Eduard-Mihai Burtescu-28/+28
2019-05-03rustc: use DefKind instead of Def, where possible.Eduard-Mihai Burtescu-22/+25
2019-05-03rustc: factor most DefId-containing variants out of Def and into DefKind.Eduard-Mihai Burtescu-17/+19
2019-05-01Split `ct_err` out into `CommonConsts`varkor-2/+23
Co-Authored-By: Gabriel Smith <yodaldevoid@users.noreply.github.com>
2019-05-01Create ShallowResolvervarkor-1/+1
Co-Authored-By: Gabriel Smith <yodaldevoid@users.noreply.github.com>
2019-05-01Remove spurious assertionvarkor-3/+0
2019-05-01Fix missing parenthesisvarkor-1/+1
2019-05-01Take ConstValue::Placeholder into account in new locationsvarkor-1/+3
2019-05-01Fix rebase from LazyConst removalvarkor-92/+86
2019-05-01Add `PlaceholderConst`varkor-0/+2
2019-05-01Add `ConstValue::Placeholder`varkor-2/+14
2019-05-01Inline ConstError into TypeErrorvarkor-49/+8
2019-05-01Implement fold_const for BoundVarReplacervarkor-14/+58
2019-05-01impl fold_const for ShifterGabriel Smith-6/+24
Signed-off-by: Gabriel Smith <ga29smith@gmail.com>
2019-05-01impl visit_const for HasEscapingVarsVisitorGabriel Smith-0/+12
Signed-off-by: Gabriel Smith <ga29smith@gmail.com>
2019-05-01impl mk_const_inferGabriel Smith-0/+12
Signed-off-by: Gabriel Smith <ga29smith@gmail.com>
2019-05-01Rename mk_infer to mk_ty_inferGabriel Smith-5/+5
Signed-off-by: Gabriel Smith <ga29smith@gmail.com>
2019-05-01Rename *shallow_resolve to *shallow_resolve_typevarkor-1/+1
Co-Authored-By: Gabriel Smith <yodaldevoid@users.noreply.github.com>
2019-05-01Handle generic consts in relate and infervarkor-5/+21
Co-Authored-By: Gabriel Smith <yodaldevoid@users.noreply.github.com>
2019-05-01Add stubs for `fold_const`varkor-0/+8
Co-Authored-By: Gabriel Smith <yodaldevoid@users.noreply.github.com>
2019-05-01Implement TypeRelation::constsvarkor-2/+32
Co-Authored-By: Gabriel Smith <yodaldevoid@users.noreply.github.com>
2019-05-01Add `ct_err`varkor-1/+3
Co-Authored-By: Gabriel Smith <yodaldevoid@users.noreply.github.com>
2019-05-01Add generic consts to `BottomUpFolder`varkor-7/+15
Co-Authored-By: Gabriel Smith <yodaldevoid@users.noreply.github.com>
2019-05-01Add `ConstError`varkor-1/+43
Co-Authored-By: Gabriel Smith <yodaldevoid@users.noreply.github.com>
2019-05-01Define `super_relate_consts`varkor-0/+64
Co-Authored-By: Gabriel Smith <yodaldevoid@users.noreply.github.com>
2019-05-01Add `consts` to `TypeRelation`varkor-5/+13
Co-Authored-By: Gabriel Smith <yodaldevoid@users.noreply.github.com>
2019-05-01Auto merge of #60435 - Centril:rollup-aa5lmuw, r=Centrilbors-8/+4
Rollup of 7 pull requests Successful merges: - #60287 (Use references for variances_of) - #60327 (Search for incompatible universes in borrow errors) - #60330 (Suggest using an inclusive range instead of an exclusive range when the endpoint overflows by 1) - #60366 (build-gcc: Create missing cc symlink) - #60369 (Support ZSTs in DispatchFromDyn) - #60404 (Implement `BorrowMut<str>` for `String`) - #60417 (Rename hir::ExprKind::Use to ::DropTemps and improve docs.) Failed merges: r? @ghost
2019-05-01Auto merge of #60195 - varkor:commontypes-to-common, r=eddybbors-14/+28
Split `CommonTypes` into `CommonTypes` and `CommonLifetimes` The so-called "`CommonTypes`" contains more than just types. r? @eddyb
2019-05-01Rollup merge of #60287 - Zoxc:the-arena-variances_of, r=eddybMazdak Farrokhzad-8/+4
Use references for variances_of Based on https://github.com/rust-lang/rust/pull/60280. cc @varkor r? @eddyb