Commit graph

15 commits

Author SHA1 Message Date
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