File tree 1 file changed +6
-4
lines changed
src/librustc_error_codes/error_codes
1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change 1
- This error occurs when there was a recursive trait requirement that overflowed
2
- before it could be evaluated. Often this means that there is unbounded
3
- recursion in resolving some type bounds.
1
+ An evaluation of a trait requirement overflowed.
4
2
5
- For example, in the following code:
3
+ Erroneous code example :
6
4
7
5
``` compile_fail,E0275
8
6
trait Foo {}
@@ -12,6 +10,10 @@ struct Bar<T>(T);
12
10
impl<T> Foo for T where Bar<T>: Foo {}
13
11
```
14
12
13
+ This error occurs when there was a recursive trait requirement that overflowed
14
+ before it could be evaluated. This often means that there is an unbounded
15
+ recursion in resolving some type bounds.
16
+
15
17
To determine if a ` T ` is ` Foo ` , we need to check if ` Bar<T> ` is ` Foo ` . However,
16
18
to do this check, we need to determine that ` Bar<Bar<T>> ` is ` Foo ` . To
17
19
determine this, we check if ` Bar<Bar<Bar<T>>> ` is ` Foo ` , and so on. This is
You can’t perform that action at this time.
0 commit comments