Skip to content

Commit 9768039

Browse files
committed
---
yaml --- r: 221549 b: refs/heads/snap-stage3 c: 522a978 h: refs/heads/master i: 221547: c9889d6 v: v3
1 parent 2ac1ebb commit 9768039

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
@@ -1,6 +1,6 @@
11
---
22
refs/heads/master: 607f74df2ad6b6fb32ce5b862a9e48a8c4afdad2
3-
refs/heads/snap-stage3: b5317761b8202affde7493d9b81a049b4727c29e
3+
refs/heads/snap-stage3: 522a9785e4866d7f6872f7d6c262ddcfc425a1f3
44
refs/heads/try: b53c0f93eedcdedd4fd89bccc5a3a09d1c5cd23e
55
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
66
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596

branches/snap-stage3/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)