190 Commits

Author SHA1 Message Date
scalexm
8e2bdaacac Add wf_clause_for_fn_def 2018-12-27 19:21:16 +01:00
scalexm
26e0ea8148 Use TraitEngine in enter_canonical_trait_query 2018-12-27 19:21:16 +01:00
scalexm
da9467d147 Handle sub-typing in chalk-engine 2018-12-27 19:21:16 +01:00
scalexm
ba6314a0d6 Integrate chalk engine 2018-12-27 19:21:16 +01:00
scalexm
ea4187a842 Fix binding levels in implied bounds rules 2018-12-27 19:21:16 +01:00
scalexm
e5992e7ae9 Fix Sized requirement for empty tuples in program_clauses 2018-12-27 19:21:16 +01:00
scalexm
dfcad82509 Add builtin impls for Sized in chalk_context::program_clauses 2018-12-27 19:21:16 +01:00
scalexm
6f488b945e Rename functions giving WF clauses for builtin types 2018-12-27 19:21:15 +01:00
scalexm
7b8da7908f Add utilities for creating generic types 2018-12-27 19:21:15 +01:00
scalexm
ec7362442c Return an instantiated environment instead of a generic one 2018-12-27 19:21:15 +01:00
scalexm
37ef0c38b7 Fix visit_ex_clause_with
The sub-visits were incorrectly combined with an `&&` instead of
an `||`.
2018-12-27 19:21:15 +01:00
scalexm
69007bd660 Implement "lifetime juggling" methods from chalk integration trait
Fixes #55097.
2018-12-27 19:21:15 +01:00
scalexm
9b87f590dc Implement is_coinductive
Fixes #55096.
2018-12-27 19:21:15 +01:00
Mark Rousskov
2a663555dd Remove licenses 2018-12-25 21:08:33 -07:00
Ariel Ben-Yehuda
760639635f add coherence future-compat warnings for marker-only trait objects
The future-compat warnings break code that assumes that `dyn Send + Sync !=
dyn Sync + Send`, and are the first step in making them equal. cc #33140.

It should be possible to revert this commit when we're done with the
warnings.
2018-12-14 19:14:22 +02:00
Nicholas Nethercote
ecf6cd4b3c Upgrade smallvec to 0.6.7 and use the new may_dangle feature. 2018-12-10 09:31:27 +11:00
Alexander Regueiro
ee89c088b0 Various minor/cosmetic improvements to code 2018-12-07 23:53:34 +00:00
John Kåre Alsaker
a70babed03 Use a function to access the Hir map to be able to turn it into a query later 2018-12-06 17:24:36 +01:00
scalexm
b2b82f790b Implement AggregateOps
`make_solution` does not return any guidance for now
2018-11-29 21:57:40 +01:00
scalexm
0169dc3f36 Implement ResolventOps 2018-11-29 21:57:40 +01:00
scalexm
3b2cfc510b Handle inference variables in nll_relate and use it for chalk 2018-11-29 21:57:34 +01:00
scalexm
c0f98e8390 Fix ChalkInferenceContext::into_hh_goal 2018-11-24 01:24:40 +01:00
scalexm
5b2baa8336 Implement some instantiate / canonical routines 2018-11-24 01:24:40 +01:00
scalexm
95861b1590 Move BoundTy debruijn index to the TyKind enum variant 2018-11-24 01:24:40 +01:00
scalexm
05995a8522 Introduce TyKind::Placeholder variant 2018-11-24 01:24:40 +01:00
Pietro Albini
97d0d8964e
Rollup merge of #55778 - nnethercote:LrcPreds, r=eddyb
Wrap some query results in `Lrc`.

So that the frequent clones in `try_get` are cheaper.
2018-11-15 11:04:36 +01:00
Nicholas Nethercote
98dab3335f Wrap some query results in Lrc.
So that the frequent clones in `try_get` are cheaper.

Fixes #54274.
2018-11-14 12:31:27 +11:00
csmoe
e853d6c5b6 Implement ProjectionEq-Normalize 2018-11-13 20:33:21 +01:00
scalexm
afa884c03a Instantiate all bound vars existentially 2018-11-13 12:28:43 +01:00
scalexm
79b6c41bc2 Use a dummy outlives requirement for where Type:, (see #53696)
A `WF(Type)` predicate was used previously, which did not play
well with implied bounds in chalk.
2018-11-13 12:28:43 +01:00
scalexm
239df7be37 Bypass ppaux for Outlives predicates 2018-11-13 12:28:43 +01:00
scalexm
3510805f7e Provide program clauses for builtin types 2018-11-13 12:28:43 +01:00
scalexm
79ba84fa79 Adjust documentation 2018-11-13 12:28:43 +01:00
scalexm
eacebf24b0 Pretty print quantified goals and clauses 2018-11-13 12:28:43 +01:00
scalexm
64aac8d4c1 Replace type params with bound vars in rustc_traits::lowering 2018-11-13 12:28:43 +01:00
Pietro Albini
f0a6e3a583
Rollup merge of #55745 - nnethercote:outlives_components-SmallVec, r=matthewjasper
Convert `outlives_components`' return value to a `SmallVec` outparam.

This avoids some allocations, reducing instruction counts by 1% on a
couple of benchmarks.
2018-11-11 00:21:12 +01:00
bors
4cd3294a1d Auto merge of #55637 - pnkfelix:issue-55552-dont-attempt-to-ascribe-projections-out-of-a-ty-var, r=nikomatsakis
Do not attempt to ascribe projections out of a ty var

If we encounter `_` ascribed to structural pattern like `(a, b)`, just skip relate_types.

Fix #55552
2018-11-10 09:38:10 +00:00
Nicholas Nethercote
5b2314b3ca Use SmallVec outparams in several functions.
This avoids some allocations, reducing instruction counts by 1% on a
couple of benchmarks.
2018-11-08 19:10:53 +11:00
scalexm
d99195ad8f Rename Binder::no_late_bound_regions to Binder::no_bound_vars 2018-11-03 11:41:55 +01:00
scalexm
d0447550da Shift both late bound regions and bound types 2018-11-03 11:41:51 +01:00
scalexm
1003b7f85e Move BoundTy to ty::TyKind 2018-11-03 11:33:14 +01:00
Felix S. Klock II
09edfb885c If we encounter _ ascribed to structural pattern like (a, b), just skip relate_types. 2018-11-03 01:53:57 +01:00
ljedrz
bb3e77d284 Change a flat_map with 0/1-element vecs to a filter_map 2018-10-29 16:28:33 +01:00
Felix S. Klock II
639a3ffadc add user_ty.projs support to AscribeUserType. 2018-10-26 23:47:53 +02:00
Niko Matsakis
62f0fc5112 port the relate-types code from NLL type-check into a type-op
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-24 15:12:50 -04:00
Niko Matsakis
7c8887ccbf introduce (but do not use) ascribe_user_type goal
Lots of annoying boilerplate.
2018-10-24 15:12:40 -04:00
Manish Goregaokar
50cc08dd94 Rollup merge of #55203 - scalexm:program-clauses, r=nikomatsakis
Sometimes I just return `ty::List::empty()` because I cannot express these \"built-in\" clauses without bound tys support.

r? @nikomatsakis
2018-10-20 13:15:48 -07:00
scalexm
91da1a5c17 Write an initial version of the program_clauses callback 2018-10-19 15:47:22 +02:00
Oliver Scherer
ee81739dc1 Deprecate the FxHashMap() and FxHashSet() constructor function hack 2018-10-19 14:34:44 +02:00
scalexm
55ce7a2669 Re-use memory in program_clauses_for_env 2018-10-17 14:12:46 +02:00