Skip to content

Commit 5a5fcdb

Browse files
---
yaml --- r: 227963 b: refs/heads/try c: 2881e83 h: refs/heads/master i: 227961: 8b0d26e 227959: 9207f24 v: v3
1 parent 3939342 commit 5a5fcdb

File tree

2 files changed

+37
-2
lines changed

2 files changed

+37
-2
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: aca2057ed5fb7af3f8905b2bc01f72fa001c35c8
33
refs/heads/snap-stage3: 1af31d4974e33027a68126fa5a5a3c2c6491824f
4-
refs/heads/try: a481c4ecdc95bf9247f262334f288ff78001ff6c
4+
refs/heads/try: 2881e83c96c6f35fdc6741bbb3f951507ef74ca5
55
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
66
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
77
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try/src/librustc_typeck/diagnostics.rs

Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1600,6 +1600,42 @@ impl Copy for &'static Bar { } // error
16001600
```
16011601
"##,
16021602

1603+
E0207: r##"
1604+
You passed an unused type parameter when implementing a trait
1605+
on an object. Erroneous code example:
1606+
1607+
```
1608+
trait MyTrait {
1609+
fn get(&self) -> usize;
1610+
}
1611+
1612+
struct Foo;
1613+
1614+
impl<T> MyTrait for Foo {
1615+
fn get(&self) -> usize {
1616+
0
1617+
}
1618+
}
1619+
```
1620+
1621+
Please check your object definition and remove unused type
1622+
parameter(s). Example:
1623+
1624+
```
1625+
trait MyTrait {
1626+
fn get(&self) -> usize;
1627+
}
1628+
1629+
struct Foo;
1630+
1631+
impl MyTrait for Foo {
1632+
fn get(&self) -> usize {
1633+
0
1634+
}
1635+
}
1636+
```
1637+
"##,
1638+
16031639
E0211: r##"
16041640
You used an intrinsic function which doesn't correspond to its
16051641
definition. Erroneous code example:
@@ -1878,7 +1914,6 @@ register_diagnostics! {
18781914
E0196, // cannot determine a type for this closure
18791915
E0203, // type parameter has more than one relaxed default bound,
18801916
// and only one is supported
1881-
E0207, // type parameter is not constrained by the impl trait, self type, or predicate
18821917
E0208,
18831918
E0209, // builtin traits can only be implemented on structs or enums
18841919
E0210, // type parameter is not constrained by any local type

0 commit comments

Comments
 (0)