Rollup merge of #33912 - GuillaumeGomez:improve_E0132, r=steveklabnik

Improve E0132 error explanation

r? @steveklabnik
This commit is contained in:
Manish Goregaokar 2016-05-30 15:19:00 +05:30
commit 11549f0206

View File

@ -1864,12 +1864,35 @@ fn main<T>() { // error: main function is not allowed to have type parameters
"##,
E0132: r##"
A function with the `start` attribute was declared with type parameters.
Erroneous code example:
```compile_fail
#![feature(start)]
#[start]
fn f<T>() {}
```
It is not possible to declare type parameters on a function that has the `start`
attribute. Such a function must have the following type signature:
attribute. Such a function must have the following type signature (for more
information: http://doc.rust-lang.org/stable/book/no-stdlib.html):
```ignore
fn(isize, *const *const u8) -> isize;
```
Example:
```
#![feature(start)]
#[start]
fn my_start(argc: isize, argv: *const *const u8) -> isize {
0
}
```
"##,
E0163: r##"