Skip to content

Commit 2be92ec

Browse files
committed
---
yaml --- r: 235809 b: refs/heads/stable c: 522a978 h: refs/heads/master i: 235807: 605d0b4 v: v3
1 parent 00fea8b commit 2be92ec

File tree

2 files changed

+23
-2
lines changed

2 files changed

+23
-2
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ refs/heads/tmp: afae2ff723393b3ab4ccffef6ac7c6d1809e2da0
2929
refs/tags/1.0.0-alpha.2: 4c705f6bc559886632d3871b04f58aab093bfa2f
3030
refs/tags/homu-tmp: f859507de8c410b648d934d8f5ec1c52daac971d
3131
refs/tags/1.0.0-beta: 8cbb92b53468ee2b0c2d3eeb8567005953d40828
32-
refs/heads/stable: b5317761b8202affde7493d9b81a049b4727c29e
32+
refs/heads/stable: 522a9785e4866d7f6872f7d6c262ddcfc425a1f3
3333
refs/tags/1.0.0: 55bd4f8ff2b323f317ae89e254ce87162d52a375
3434
refs/tags/1.1.0: bc3c16f09287e5545c1d3f76b7abd54f2eca868b
3535
refs/tags/1.2.0: f557861f822c34f07270347b94b5280de20a597e

branches/stable/src/librustc/diagnostics.rs

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1462,6 +1462,28 @@ recursive requirement that can't be resolved directly.
14621462
Consider changing your trait bounds so that they're less self-referential.
14631463
"##,
14641464

1465+
E0276: r##"
1466+
This error occurs when a bound in an implementation of a trait does not match
1467+
the bounds specified in the original trait. For example:
1468+
1469+
```
1470+
trait Foo {
1471+
fn foo<T>(x: T);
1472+
}
1473+
1474+
impl Foo for bool {
1475+
fn foo<T>(x: T) where T: Copy {}
1476+
}
1477+
```
1478+
1479+
Here, all types implementing `Foo` must have a method `foo<T>(x: T)` which can
1480+
take any type `T`. However, in the `impl` for `bool`, we have added an extra
1481+
bound that `T` is `Copy`, which isn't compatible with the original trait.
1482+
1483+
Consider removing the bound from the method or adding the bound to the original
1484+
method definition in the trait.
1485+
"##,
1486+
14651487
E0277: r##"
14661488
You tried to use a type which doesn't implement some trait in a place which
14671489
expected that trait. Erroneous code example:
@@ -1886,7 +1908,6 @@ register_diagnostics! {
18861908
// E0134,
18871909
// E0135,
18881910
E0264, // unknown external lang item
1889-
E0276, // requirement appears on impl method but not on corresponding trait method
18901911
E0278, // requirement is not satisfied
18911912
E0279, // requirement is not satisfied
18921913
E0280, // requirement is not satisfied

0 commit comments

Comments
 (0)