@@ -49,8 +49,8 @@ unique `impl` which should be used.
49
49
50
50
## How to implement coinduction
51
51
52
- While our implementation can not check for coninduction by trying to construct an infinite
53
- tree as that would take infinite ressources , it still makes sense to think of coinduction
52
+ While our implementation can not check for coinduction by trying to construct an infinite
53
+ tree as that would take infinite resources , it still makes sense to think of coinduction
54
54
from this perspective.
55
55
56
56
As we cannot check for infinite trees, we instead search for patterns for which we know that
70
70
{}
71
71
```
72
72
Proving ` Wrapper<?0>: Foo ` uses the impl ` impl<T> Foo for Wrapper<Wrapper<T>> ` which constrains
73
- ` ?0 ` to ` Vec <?1>` and then requires ` Wrapper<?1>: Foo ` . Due to canonicalization this would be
73
+ ` ?0 ` to ` Wrapper <?1>` and then requires ` Wrapper<?1>: Foo ` . Due to canonicalization this would be
74
74
detected as a cycle.
75
75
76
76
The idea to solve is to return a * provisional result* whenever we detect a cycle and repeatedly
@@ -112,8 +112,8 @@ impl<T: Clone> Clone for List<T> {
112
112
```
113
113
114
114
We are using ` tail.clone() ` in this impl. For this we have to prove ` Box<List<T>>: Clone `
115
- which requires ` List<T>: Clone ` but that relies on the currently impl which we are currently
116
- checking. By adding that requirement to the ` where ` -clauses of the impl, which is what we would
115
+ which requires ` List<T>: Clone ` but that relies on the impl which we are currently checking.
116
+ By adding that requirement to the ` where ` -clauses of the impl, which is what we would
117
117
do with [ perfect derive] , we move that cycle into the trait solver and [ get an error] [ ex1 ] .
118
118
119
119
### Recursive data types
@@ -163,12 +163,12 @@ The issues here are not relevant for the current solver.
163
163
164
164
#### Implied super trait bounds
165
165
166
- Our trait system currectly treats super traits, e.g. ` trait Trait: SuperTrait ` ,
166
+ Our trait system currently treats super traits, e.g. ` trait Trait: SuperTrait ` ,
167
167
by 1) requiring that ` SuperTrait ` has to hold for all types which implement ` Trait ` ,
168
168
and 2) assuming ` SuperTrait ` holds if ` Trait ` holds.
169
169
170
170
Relying on 2) while proving 1) is unsound. This can only be observed in case of
171
- coinductive cycles. Without a cycles, whenever we rely on 2) we must have also
171
+ coinductive cycles. Without cycles, whenever we rely on 2) we must have also
172
172
proven 1) without relying on 2) for the used impl of ` Trait ` .
173
173
174
174
``` rust
0 commit comments