@@ -27,18 +27,18 @@ In addition to the notations introduced in the chapter about
27
27
lowering rules, we'll introduce another notation: when checking WF of a
28
28
declaration, we'll often have to prove that all types that appear are
29
29
well-formed, except type parameters that we always assume to be WF. Hence,
30
- we'll use the following notation: for a type ` SomeType<...> ` , we denote
31
- ` InputTypes(SomeType<...>) ` the set of all non-parameter types appearing in
32
- ` SomeType<...> ` , including ` SomeType<...> ` itself.
30
+ we'll use the following notation: for a type ` SomeType<...> ` , we define
31
+ ` InputTypes(SomeType<...>) ` to be the set of all non-parameter types appearing
32
+ in ` SomeType<...> ` , including ` SomeType<...> ` itself.
33
33
34
34
Examples:
35
35
* ` InputTypes((u32, f32)) = [u32, f32, (u32, f32)] `
36
- * ` InputTypes(Box<T>) = [Box<T>] `
36
+ * ` InputTypes(Box<T>) = [Box<T>] ` (assuming that ` T ` is a type parameter)
37
37
* ` InputTypes(Box<Box<T>>) = [Box<T>, Box<Box<T>>] `
38
38
39
- We may naturally extend the ` InputTypes ` notation to where clauses, for example
40
- ` InputTypes(A0: Trait<A1,...,An>) ` is the union of ` InputTypes(A0) ` ,
41
- ` InputTypes(A1) ` , ..., ` InputTypes(An) ` .
39
+ We also extend the ` InputTypes ` notation to where clauses in the natural way.
40
+ So, for example ` InputTypes(A0: Trait<A1,...,An>) ` is the union of
41
+ ` InputTypes(A0) ` , ` InputTypes( A1)` , ..., ` InputTypes(An) ` .
42
42
43
43
# Type definitions
44
44
@@ -51,7 +51,7 @@ struct Type<P...> where WC_type {
51
51
}
52
52
```
53
53
54
- we generate the following goal:
54
+ we generate the following goal, which represents its well-formedness condition :
55
55
``` text
56
56
forall<P...> {
57
57
if (FromEnv(WC_type)) {
@@ -63,7 +63,7 @@ forall<P...> {
63
63
}
64
64
```
65
65
66
- which in English gives : assuming that the where clauses defined on the type
66
+ which in English states : assuming that the where clauses defined on the type
67
67
hold, prove that every type appearing in the type definition is well-formed.
68
68
69
69
Some examples:
@@ -284,7 +284,7 @@ Next, still assuming that the where clauses on the impl `WC_impl` hold and that
284
284
the input types of ` SomeType<A2...> ` are well-formed, we prove that
285
285
` WellFormed(SomeType<A2...>: Trait<A1...>) ` hold. That is, we want to prove
286
286
that ` SomeType<A2...> ` verify all the where clauses that might transitively
287
- come from the ` Trait ` definition (see
287
+ be required by the ` Trait ` definition (see
288
288
[ this subsection] ( ./implied-bounds.md#co-inductiveness-of-wellformed ) ).
289
289
290
290
Lastly, assuming in addition that the where clauses on the associated type
0 commit comments