Add E0124 error explanation

This commit is contained in:
Guillaume Gomez 2015-07-01 13:07:29 +02:00
parent a9e26b5ced
commit d2e6ddabc4

View File

@ -1347,6 +1347,27 @@ static BAR: _ = "test"; // error, explicitly write out the type instead
```
"##,
E0124: r##"
You declared two fields of a struct with the same name. Erroneous code
example:
```
struct Foo {
field1: i32,
field1: i32 // error: field is already declared
}
```
Please check you didn't mispelled one field. Example:
```
struct Foo {
field1: i32,
field2: i32 // ok!
}
```
"##,
E0131: r##"
It is not possible to define `main` with type parameters, or even with function
parameters. When `main` is present, it must take no arguments and return `()`.
@ -1956,7 +1977,6 @@ register_diagnostics! {
E0120,
E0122,
E0123,
E0124,
E0127,
E0128,
E0129,