Commit Graph

28 Commits

Author SHA1 Message Date
Yuning Zhang
710dcbd381 Improve type mismatch error messages
Replace "integral variable" with "integer" and replace
"floating-point variable" with "floating-point number" to make the
message less confusing.
2018-12-31 20:43:08 -05:00
scalexm
81d6f9cc81 Add tests 2018-12-27 19:21:16 +01:00
Mark Rousskov
2a663555dd Remove licenses 2018-12-25 21:08:33 -07:00
csmoe
e853d6c5b6 Implement ProjectionEq-Normalize 2018-11-13 20:33:21 +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
eacebf24b0 Pretty print quantified goals and clauses 2018-11-13 12:28:43 +01:00
scalexm
b5d1aac883 Add tests for program_clauses_for_env 2018-10-17 14:09:39 +02:00
scalexm
96ff827395 Add chalk rules related to associated type defs
* Rule ProjectionEq-Skolemize
* Rule WellFormed-AssocTy
* Rule Implied-Trait-From-AssocTy
2018-10-08 15:26:22 +02:00
scalexm
8327976890 Remove duplicate predicates in explicit_predicates_of
Fixes #52187.
2018-10-03 13:57:47 +02:00
Eduard-Mihai Burtescu
6b8fba5a42 rustc_typeck: turn where Type:, into a WF(Type) predicate, instead of ignoring it. 2018-08-31 09:02:35 +03:00
Mark Mansi
3a9cf12021 fix some anon params 2018-08-27 12:40:16 -05:00
csmoe
f5f97b37a7 update tests 2018-07-07 11:57:04 +08:00
csmoe
ff83ef0c24 merge wellformed(wc)s 2018-07-05 18:49:02 +08:00
csmoe
329d03ac1f update test 2018-07-05 18:47:00 +08:00
Niko Matsakis
90ea49b891 introduce predicates_defined_on for traits
This new query returns only the predicates *directly defined* on an
item (in contrast to the more common `predicates_of`, which returns
the predicates that must be proven to reference an item). These two
sets are almost always identical except for traits, where
`predicates_of` includes an artificial `Self: Trait<...>` predicate
(basically saying that you cannot use a trait item without proving
that the trait is implemented for the type parameters).

This new query is only used in chalk lowering, where this artificial
`Self: Trait` predicate is problematic. We encode it in metadata but
only where needed since it is kind of repetitive with existing
information.

Co-authored-by: Tyler Mandry <tmandry@gmail.com>
2018-07-02 11:33:24 -04:00
scalexm
796ded2dfd Add tests for WellFormed-Type and FromEnv-Type rules 2018-06-07 14:45:09 +02:00
scalexm
09f6cb93ca Remove FromEnv(ProjectionEq(...)) from tests 2018-06-07 14:40:24 +02:00
Niko Matsakis
2c5fbe2058 sort strings on output 2018-04-23 13:28:15 -04:00
Niko Matsakis
294cae22ee first draft of program_clauses_for_env
This computes the transitive closure of traits that appear in the
environment and then appends their clauses. It needs some work, but
it's in the right direction.
2018-04-23 13:28:14 -04:00
Niko Matsakis
7173fd78c6 in unit tests, use note to dump multiple program clauses
(rather than issuing multiple errors)

Also, reorder so that the annotations are considered "used" when the
lint runs.
2018-04-23 13:28:14 -04:00
Fabian Zaiser
de475582c4 Stop duplicating where clauses from impl's. 2018-04-15 23:32:58 +02:00
Fabian Zaiser
5a73fd5e1f Implement Chalk lowering rule Normalize-From-Impl 2018-04-15 23:32:57 +02:00
Tyler Mandry
7ac35eaa12 chalkify: Implement Rule Implied-Bound-From-Trait 2018-04-06 13:05:45 -05:00
varkor
7791995ad5 Add unit test for Implemented-From-Env 2018-03-20 15:23:54 +00:00
scalexm
04b228c3e2 Address niko's nits 2018-03-14 14:14:33 +01:00
scalexm
1271f0bd25 Add MVP for chalkification 2018-03-14 13:39:58 +01:00