about summary refs log tree commit diff
path: root/src/librustc/ty/wf.rs
AgeCommit message (Collapse)AuthorLines
2019-04-26Update handling of Tuplevarkor-1/+1
2019-03-16Revert the `LazyConst` PROliver Scherer-2/+3
2019-03-12ignore higher-ranked WF requirements for trait objectsNiko Matsakis-2/+1
In the `issue-53548` test added in this commit, the `Box<dyn Trait>` type is expanded to `Box<dyn Trait + 'static>`, but the generator "witness" that results is `for<'r> { Box<dyn Trait + 'r> }`. The WF code was encountering an ICE (when debug-assertions were enabled) and an unexpected compilation error (without debug-asserions) when trying to process this `'r` region bound. In particular, to be WF, the region bound must meet the requirements of the trait, and hence we got `for<'r> { 'r: 'static }`. This would ICE because the `Binder` constructor we were using was assering that no higher-ranked regions were involved (because the WF code is supposed to skip those). The error (if debug-asserions were disabled) came because we obviously cannot prove that `'r: 'static` for any region `'r`. Pursuant with our "lazy WF" strategy for higher-ranked regions, the fix is not to require that `for<'r> { 'r: 'static }` holds (this is also analogous to what we would do for higher-ranked regions appearing within the trait in other positions).
2019-02-27rename Substs to InternalSubstscsmoe-2/+2
Change-Id: I3fa00e999a2ee4eb72db1fdf53a8633b49176a18
2019-02-13HirId-ify hir::BodyIdljedrz-5/+5
2019-02-10rustc: doc commentsAlexander Regueiro-2/+2
2019-02-05move librustc to 2018Mark Mansi-6/+6
2019-01-05Auto merge of #56837 - arielb1:nonprincipal-trait-objects, r=nikomatsakisbors-1/+1
Add support for trait-objects without a principal The hard-error version of #56481 - should be merged after we do something about the `traitobject` crate. Fixes #33140. Fixes #57057. r? @nikomatsakis
2019-01-04add support for principal-less trait object typesAriel Ben-Yehuda-1/+1
should be a pure refactoring.
2019-01-01Move the `Unevaluated` constant arm upwards in the type structureOliver Scherer-7/+4
2018-12-30Stop well-formedness checking unreachable code.David Wood-1/+6
This commit stops well-formedness checking applying to unreachable code and therefore stops some of the ICEs that the intended solution taken by this PR causes. By disabling these checks, we can land the other fixes and larger refactors that this PR includes.
2018-12-25Remove licensesMark Rousskov-10/+0
2018-11-24Introduce `TyKind::Placeholder` variantscalexm-0/+1
2018-11-03Shift both late bound regions and bound typesscalexm-7/+7
2018-11-03Move `BoundTy` to `ty::TyKind`scalexm-0/+1
2018-10-13Check the invariant for `principal` inside the methodOliver Scherer-1/+1
2018-10-05Auto merge of #54743 - ljedrz:cleanup_ty_p2, r=zackmdavisbors-2/+3
Cleanup rustc/ty part 2 The second part of cleanups and minor improvements for rustc/ty. - improve allocations - calculate span after a possible early continue - simplify some patterns - mark a comment as FIXME - whitespace fixes The PR is independent from from the first part.
2018-10-04rename skolemized to placeholderNiko Matsakis-1/+1
2018-10-03Introduce `TyKind::UnnormalizedProjection`scalexm-0/+2
2018-10-03rustc/ty: improve allocationsljedrz-0/+1
2018-10-03rustc/ty: whitespace fixesljedrz-2/+2
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-18/+18
Ty{Adt|Array|Slice|RawPtr|Ref|FnDef|FnPtr|Dynamic|Closure|Generator|GeneratorWitness|Never|Tuple|Projection|Anon|Infer|Error}
2018-08-22Rename ty::Slice to ty::Listvarkor-2/+2
2018-07-18Prepare for using wfcheck on existential typesOliver Schneider-1/+7
2018-06-28Merge `ConstVal` and `ConstValue`Oliver Schneider-13/+10
2018-06-28Move everything over from `middle::const_val` to `mir::interpret`Oliver Schneider-1/+1
2018-05-08Insert fields from TypeAndMut into TyRef to allow layout optimizationJohn Kåre Alsaker-3/+3
2018-04-24Make Binder's field private and clean up its usageTyler Mandry-2/+3
2018-03-14remove defaulting to unitAndrew Cann-1/+1
Types will no longer default to `()`, instead always defaulting to `!`. This disables the associated warning and removes the flag from TyTuple
2018-03-08Nuke the entire ctfe from orbit, it's the only way to be sureOliver Schneider-24/+2
2018-03-08Add a variant to ConstVal for storing miri resultsOliver Schneider-0/+1
2018-03-04Remove ty::Predicate::Equate and ty::EquatePredicate (dead code)Tatsuyuki Ishi-4/+0
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-11-20extend comment further to explain why we limit wf to `upvar_tys`Niko Matsakis-0/+9
2017-11-18comment wf moreNiko Matsakis-15/+27
2017-11-18move the signature into the closure typeNiko Matsakis-1/+16
2017-10-27Implement RFC 1861: Extern typesPaul Lietar-1/+2
2017-09-11rustc: evaluate fixed-length array length expressions lazily.Eduard-Mihai Burtescu-1/+46
2017-09-11rustc: use ty::Const for the length of TyArray.Eduard-Mihai Burtescu-2/+11
2017-08-25Merge remote-tracking branch 'origin/master' into genAlex Crichton-5/+47
2017-08-25Change to `Elaborate::None` inside `compute_projection`scalexm-1/+1
2017-08-23add a commentNiko Matsakis-0/+23
2017-08-10Do not elaborate trait obligations in where clausesscalexm-12/+21
2017-08-10Elaborate trait obligations when typechecking implsscalexm-7/+6
Fixes #43784.
2017-08-10Fix for the supertrait example in #43784scalexm-0/+11
2017-07-28Generator literal supportJohn Kåre Alsaker-2/+2
2017-07-11Downgrade ProjectionTy's TraitRef to its substsTobias Schottdorf-3/+3
Addresses the second part of #42171 by removing the `TraitRef` from `ProjectionTy`, and directly storing its `Substs`. Closes #42171.