File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
src/librustc_error_codes/error_codes Expand file tree Collapse file tree 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.
42
5- For example, in the following code:
3+ Erroneous code example :
64
75``` compile_fail,E0275
86trait Foo {}
@@ -12,6 +10,10 @@ struct Bar<T>(T);
1210impl<T> Foo for T where Bar<T>: Foo {}
1311```
1412
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+
1517To determine if a ` T ` is ` Foo ` , we need to check if ` Bar<T> ` is ` Foo ` . However,
1618to do this check, we need to determine that ` Bar<Bar<T>> ` is ` Foo ` . To
1719determine 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