about summary refs log tree commit diff
path: root/src/librustc/traits/query
AgeCommit message (Collapse)AuthorLines
2019-04-26Update handling of Tuplevarkor-1/+1
2019-03-16Revert the `LazyConst` PROliver Scherer-5/+6
2019-02-27rename Substs to InternalSubstscsmoe-2/+2
Change-Id: I3fa00e999a2ee4eb72db1fdf53a8633b49176a18
2019-02-13HirId-ify hir::BodyIdljedrz-2/+2
2019-02-10rustc: doc commentsAlexander Regueiro-6/+6
2019-02-09Auto merge of #58207 - nnethercote:intern_lazy_const, r=oli-obkbors-2/+2
Make `intern_lazy_const` actually intern its argument. Currently it just unconditionally allocates it in the arena. For a "Clean Check" build of the the `packed-simd` benchmark, this change reduces both the `max-rss` and `faults` counts by 59%; it slightly (~3%) increases the instruction counts but the `wall-time` is unchanged. For the same builds of a few other benchmarks, `max-rss` and `faults` drop by 1--5%, but instruction counts and `wall-time` changes are in the noise. Fixes #57432, fixes #57829.
2019-02-06Make `intern_lazy_const` actually intern its argument.Nicholas Nethercote-2/+2
Currently it just unconditionally allocates it in the arena. For a "Clean Check" build of the the `packed-simd` benchmark, this change reduces both the `max-rss` and `faults` counts by 59%; it slightly (~3%) increases the instruction counts but the `wall-time` is unchanged. For the same builds of a few other benchmarks, `max-rss` and `faults` drop by 1--5%, but instruction counts and `wall-time` changes are in the noise. Fixes #57432, fixes #57829.
2019-02-05move librustc to 2018Mark Mansi-68/+68
2019-01-19Handle lifetime annotations in unreachable codeMatthew Jasper-10/+5
We equate the type in the annotation with the inferred type first so that we have a fully inferred type to perform the well-formedness check on.
2019-01-04Auto merge of #56723 - oli-obk:lazy_const, r=nikomatsakisbors-6/+7
Don't emit `Unevaluated` from `const_eval` cc @eddyb @RalfJung
2019-01-02make evaluation track whether outlives relationships matteredNiko Matsakis-2/+17
Previously, evaluation ignored outlives relationships. Since we using evaluation to skip the "normal" trait selection (which enforces outlives relationships) this led to incorrect results in some cases.
2019-01-01Move the `Unevaluated` constant arm upwards in the type structureOliver Scherer-6/+7
2018-12-30Stop well-formedness checking unreachable code.David Wood-61/+1
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-30Always check well-formedness.David Wood-2/+62
This commit uses the map introduced by the previous commit to ensure that types are always checked for well-formedness by the NLL type check. Previously, without the map introduced by the previous commit, types would not be checked for well-formedness if the `AscribeUserType` statement that would trigger that check was removed as unreachable code.
2018-12-25Remove licensesMark Rousskov-160/+0
2018-12-23Rollup merge of #56984 - ljedrz:dropck_outlives_tweaks, r=oli-obkkennytm-8/+7
A few tweaks to dropck_outlives - remove an unnecessary call to `cloned()` - simplify common patterns
2018-12-19dropck: remove unnecessary call to cloned()ljedrz-1/+1
2018-12-19dropck: simplify common patternsljedrz-7/+6
2018-12-15move overflow error reporting out of the queryAriel Ben-Yehuda-2/+5
that allows the error reporting to contain the span.
2018-12-15make autoderef steps a queryAriel Ben-Yehuda-0/+53
2018-11-26rustc-guide has movedMark Mansi-1/+1
2018-11-24Rename some occurences of `skol` to `placeholder`scalexm-1/+1
2018-11-24Introduce `TyKind::Placeholder` variantscalexm-0/+1
2018-11-13fix various typos in doc commentsAndy Russell-1/+1
2018-11-03Rename `Binder::no_late_bound_regions` to `Binder::no_bound_vars`scalexm-1/+1
2018-11-03Shift both late bound regions and bound typesscalexm-2/+2
2018-11-03Move `BoundTy` to `ty::TyKind`scalexm-0/+1
2018-10-27allow canonicalized regions to carry universe and track max-universeNiko Matsakis-25/+11
But.. we don't really use it for anything right now.
2018-10-26add user_ty.projs support to `AscribeUserType`.Felix S. Klock II-4/+7
2018-10-24port the relate-types code from NLL type-check into a type-opNiko Matsakis-7/+10
Add regression tests for #55219 and #55241 Also another test where a duplicate-like error appears to have been suppressed; I'm not 100% sure why this output changes, though I could imagine that some duplicate suppression is enabled by this PR.
2018-10-24introduce (but do not use) `ascribe_user_type` goalNiko Matsakis-0/+78
Lots of annoying boilerplate.
2018-10-15hide `SmallCanonicalVarValues` in `OriginalQueryValues` structNiko Matsakis-11/+11
2018-10-15type_op/mod.rs: rustfmtNiko Matsakis-2/+3
2018-10-15rename `QueryResult` to `QueryResponse`Niko Matsakis-68/+68
`Result` really sounds like the rustc result type
2018-10-03Introduce `TyKind::UnnormalizedProjection`scalexm-0/+2
2018-09-29don't elide lifetimes in paths in librustc/Zack M. Davis-1/+1
This seemed like a good way to kick the tires on the elided-lifetimes-in-paths lint (#52069)—seems to work! This was also pretty tedious—it sure would be nice if `cargo fix` worked on this codebase (#53896)!
2018-09-26Auto merge of #54199 - nikomatsakis:predicate_may_hold-failure, r=eddybbors-8/+24
overlook overflows in rustdoc trait solving Context: The new rustdoc "auto trait" feature walks across impls and tries to run trait solving on them with a lot of unconstrained variables. This is prone to overflows. These overflows used to cause an ICE because of a caching bug (fixed in this PR). But even once that is fixed, it means that rustdoc causes an overflow rather than generating docs. This PR therefore adds a new helper that propagates the overflow error out. This requires rustdoc to then decide what to do when it encounters such an overflow: technically, an overflow represents neither "yes" nor "no", but rather a failure to make a decision. I've decided to opt on the side of treating this as "yes, implemented", since rustdoc already takes an optimistic view. This may prove to include too many items, but I *suspect* not. We could probably reduce the rate of overflows by unifying more of the parameters from the impl -- right now we only seem to consider the self type. Moreover, in the future, as we transition to Chalk, overflow errors are expected to just "go away" (in some cases, though, queries might return an ambiguous result). Fixes #52873 cc @QuietMisdreavus -- this is the stuff we were talking about earlier cc @GuillaumeGomez -- this supersedes #53687
2018-09-18A few cleanups and minor improvements to rustc/traitsljedrz-43/+29
2018-09-13expose `evaluate_obligation` that captures overflow, use in rustdocNiko Matsakis-7/+16
2018-09-13give a more informative failure in this caseNiko Matsakis-1/+8
2018-09-05Changing TyAnon -> TyOpaque and relevant functionsms2300-2/+2
2018-08-27Auto merge of #53580 - nikomatsakis:nll-issue-53568, r=pnkfelixbors-2/+89
fix NLL ICEs Custom type-ops reuse some of the query machinery -- but while query results are canonicalized after they are constructed, custom type ops are not, and hence we have to resolve the type variables to avoid an ICE here. Also, use the type-op machinery for implied outlives bounds. Fixes #53568 Fixes #52992 Fixes #53680
2018-08-23Auto merge of #53588 - ↵bors-30/+8
tristanburgess:52985_diagnostics_no_concrete_type_behind_existential_type, r=oli-obk 52985 diagnostics no concrete type behind existential type @oli-obk FYI. See below for new cycle error generated. ```rust error[E0391]: cycle detected when processing `Foo` --> /dev/staging/existential_type_no_concrete_type_nouse_potential.rs:3:1 | 3 | existential type Foo: Copy; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | note: ...which requires processing `bar`... --> /dev/staging/existential_type_no_concrete_type_nouse_potential.rs:6:23 | 6 | fn bar(x: Foo) -> Foo { | _______________________^ 7 | | x 8 | | } | |_^ = note: ...which again requires processing `Foo`, completing the cycle error: aborting due to previous error For more information about this error, try `rustc --explain E0391`. ```
2018-08-23use `TypeOp` machinery for `outlives_bounds`Niko Matsakis-0/+81
Fixes #52992
2018-08-23resolve type variables in the custom type op pathwayNiko Matsakis-1/+2
2018-08-23Use optimized SmallVec implementationIgor Gutorov-5/+5
2018-08-2252985: formatting PR filesTristan Burgess-9/+14
2018-08-2252985: better cycle error for existential typesTristan Burgess-36/+9
- Original cycle error diagnostics PR'd against this issue caught panic-causing error while resolving std::mem::transmute calls - Now, catch invalid use case of not providing a concrete sized type behind existential type in definining use case. - Update relevant test to reflect this new error 52985: revert normalize query changes - PR 53588 invalidates 53316, causing a correct cycle error to occur with a good span. - Don't need to revert the whole merge as the test files are still fine, just need to revert the normalize query changes. - It should now be correct that infinite recursion detected during normalize query type folding is a bug, should have been caught earlier (when resolving the existential type's defining use cases). 52985: code review impl - Only cause cycle error if anonymous type resolves to anonymous type that has the same def id (is the same type) as the original (parent) type. - Add test case to cover this case for existential types. 52985: remove Ty prefix from TyAnon - To align with changes per commit 6f637da50c56a22f745fd056691da8c86824cd9b
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