Skip to content

Commit d165867

Browse files
Add E0191 error explanation
1 parent fd8e175 commit d165867

File tree

1 file changed

+24
-1
lines changed

1 file changed

+24
-1
lines changed

src/librustc_typeck/diagnostics.rs

+24-1
Original file line numberDiff line numberDiff line change
@@ -1550,6 +1550,30 @@ impl Foo for Bar {
15501550
```
15511551
"##,
15521552

1553+
E0191: r##"
1554+
You have to specify all the associated types. Erroneous code example:
1555+
1556+
```
1557+
trait Trait {
1558+
type Bar;
1559+
}
1560+
1561+
type Foo = Trait; // error: the value of the associated type `Bar` (from
1562+
// the trait `Trait`) must be specified
1563+
```
1564+
1565+
Please verify you specified all associated types of the trait or that you
1566+
used the good trait. Example:
1567+
1568+
```
1569+
trait Trait {
1570+
type Bar;
1571+
}
1572+
1573+
type Foo = Trait<Bar=i32>; // ok!
1574+
```
1575+
"##,
1576+
15531577
E0192: r##"
15541578
Negative impls are only allowed for traits with default impls. For more
15551579
information see the [opt-in builtin traits RFC](https://github.com/rust-lang/
@@ -2074,7 +2098,6 @@ register_diagnostics! {
20742098
E0188, // can not cast a immutable reference to a mutable pointer
20752099
E0189, // deprecated: can only cast a boxed pointer to a boxed object
20762100
E0190, // deprecated: can only cast a &-pointer to an &-object
2077-
E0191, // value of the associated type must be specified
20782101
E0193, // cannot bound type where clause bounds may only be attached to types
20792102
// involving type parameters
20802103
E0194,

0 commit comments

Comments
 (0)