Skip to content

Commit 6f01aa0

Browse files
Add E0232 error explanation
1 parent c01c1fd commit 6f01aa0

File tree

1 file changed

+18
-3
lines changed

1 file changed

+18
-3
lines changed

src/librustc_typeck/diagnostics.rs

+18-3
Original file line numberDiff line numberDiff line change
@@ -1563,7 +1563,7 @@ type Foo = Trait; // error: the value of the associated type `Bar` (from
15631563
// the trait `Trait`) must be specified
15641564
```
15651565
1566-
Please verify you specified all associated types of the trait or that you
1566+
Please verify you specified all associated types of the trait and that you
15671567
used the right trait. Example:
15681568
15691569
```
@@ -1869,7 +1869,7 @@ type Foo = Trait<F=i32>; // error: associated type `F` not found for
18691869
// `Trait`
18701870
```
18711871
1872-
Please verify you used the good trait or you didn't mispelled the
1872+
Please verify you used the right trait or you didn't misspell the
18731873
associated type name. Example:
18741874
18751875
```
@@ -1881,6 +1881,22 @@ type Foo = Trait<Bar=i32>; // ok!
18811881
```
18821882
"##,
18831883

1884+
E0232: r##"
1885+
The attribute must have a value. Erroneous code example:
1886+
1887+
```
1888+
#[rustc_on_unimplemented] // error: this attribute must have a value
1889+
trait Bar {}
1890+
```
1891+
1892+
Please supply the missing value of the attribute. Example:
1893+
1894+
```
1895+
#[rustc_on_unimplemented = "foo"] // ok!
1896+
trait Bar {}
1897+
```
1898+
"##,
1899+
18841900
E0243: r##"
18851901
This error indicates that not enough type parameters were found in a type or
18861902
trait.
@@ -2153,7 +2169,6 @@ register_diagnostics! {
21532169
E0229, // associated type bindings are not allowed here
21542170
E0230, // there is no type parameter on trait
21552171
E0231, // only named substitution parameters are allowed
2156-
E0232, // this attribute must have a value
21572172
E0233,
21582173
E0234,
21592174
E0235, // structure constructor specifies a structure of type but

0 commit comments

Comments
 (0)