Skip to content

Commit d2793ae

Browse files
committed
---
yaml --- r: 224225 b: refs/heads/beta c: b531776 h: refs/heads/master i: 224223: 6d2fb50 v: v3
1 parent c45baf6 commit d2793ae

File tree

2 files changed

+24
-2
lines changed

2 files changed

+24
-2
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ refs/tags/0.9: 36870b185fc5f5486636d4515f0e22677493f225
2323
refs/tags/0.10: ac33f2b15782272ae348dbd7b14b8257b2148b5a
2424
refs/tags/0.11.0: e1247cb1d0d681be034adb4b558b5a0c0d5720f9
2525
refs/tags/0.12.0: f0c419429ef30723ceaf6b42f9b5a2aeb5d2e2d1
26-
refs/heads/beta: dc556bef4313b59f082a1a0f7f2d30ef9cc88c0c
26+
refs/heads/beta: b5317761b8202affde7493d9b81a049b4727c29e
2727
refs/tags/1.0.0-alpha: e42bd6d93a1d3433c486200587f8f9e12590a4d7
2828
refs/heads/tmp: 938f5d7af401e2d8238522fed4a612943b6e77fd
2929
refs/tags/1.0.0-alpha.2: 4c705f6bc559886632d3871b04f58aab093bfa2f

branches/beta/src/librustc/diagnostics.rs

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1439,6 +1439,29 @@ anything, please remove the attribute or add some helpful note for users of the
14391439
trait.
14401440
"##,
14411441

1442+
E0275: r##"
1443+
This error occurs when there was a recursive trait requirement that overflowed
1444+
before it could be evaluated. Often this means that there is unbounded recursion
1445+
in resolving some type bounds.
1446+
1447+
For example, in the following code
1448+
1449+
```
1450+
trait Foo {}
1451+
1452+
struct Bar<T>(T);
1453+
1454+
impl<T> Foo for T where Bar<T>: Foo {}
1455+
```
1456+
1457+
to determine if a `T` is `Foo`, we need to check if `Bar<T>` is `Foo`. However,
1458+
to do this check, we need to determine that `Bar<Bar<T>>` is `Foo`. To determine
1459+
this, we check if `Bar<Bar<Bar<T>>>` is `Foo`, and so on. This is clearly a
1460+
recursive requirement that can't be resolved directly.
1461+
1462+
Consider changing your trait bounds so that they're less self-referential.
1463+
"##,
1464+
14421465
E0277: r##"
14431466
You tried to use a type which doesn't implement some trait in a place which
14441467
expected that trait. Erroneous code example:
@@ -1863,7 +1886,6 @@ register_diagnostics! {
18631886
// E0134,
18641887
// E0135,
18651888
E0264, // unknown external lang item
1866-
E0275, // overflow evaluating requirement
18671889
E0276, // requirement appears on impl method but not on corresponding trait method
18681890
E0278, // requirement is not satisfied
18691891
E0279, // requirement is not satisfied

0 commit comments

Comments
 (0)