Skip to content

Commit 37e7b46

Browse files
clean up E0275 explanation
1 parent 320ada6 commit 37e7b46

File tree

1 file changed

+6
-4
lines changed
  • src/librustc_error_codes/error_codes

1 file changed

+6
-4
lines changed

src/librustc_error_codes/error_codes/E0275.md

+6-4
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
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
86
trait Foo {}
@@ -12,6 +10,10 @@ struct Bar<T>(T);
1210
impl<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+
1517
To determine if a `T` is `Foo`, we need to check if `Bar<T>` is `Foo`. However,
1618
to do this check, we need to determine that `Bar<Bar<T>>` is `Foo`. To
1719
determine this, we check if `Bar<Bar<Bar<T>>>` is `Foo`, and so on. This is

0 commit comments

Comments
 (0)