File tree Expand file tree Collapse file tree 1 file changed +24
-1
lines changed Expand file tree Collapse file tree 1 file changed +24
-1
lines changed Original file line number Diff line number Diff line change @@ -1864,12 +1864,35 @@ fn main<T>() { // error: main function is not allowed to have type parameters
18641864"## ,
18651865
18661866E0132 : r##"
1867+ A function with the `start` attribute was declared with type parameters.
1868+
1869+ Erroneous code example:
1870+
1871+ ```compile_fail
1872+ #![feature(start)]
1873+
1874+ #[start]
1875+ fn f<T>() {}
1876+ ```
1877+
18671878It is not possible to declare type parameters on a function that has the `start`
1868- attribute. Such a function must have the following type signature:
1879+ attribute. Such a function must have the following type signature (for more
1880+ information: http://doc.rust-lang.org/stable/book/no-stdlib.html):
18691881
18701882```ignore
18711883fn(isize, *const *const u8) -> isize;
18721884```
1885+
1886+ Example:
1887+
1888+ ```
1889+ #![feature(start)]
1890+
1891+ #[start]
1892+ fn my_start(argc: isize, argv: *const *const u8) -> isize {
1893+ 0
1894+ }
1895+ ```
18731896"## ,
18741897
18751898E0163 : r##"
You can’t perform that action at this time.
0 commit comments