File tree 1 file changed +24
-1
lines changed
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
1864
1864
"## ,
1865
1865
1866
1866
E0132 : 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
+
1867
1878
It 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):
1869
1881
1870
1882
```ignore
1871
1883
fn(isize, *const *const u8) -> isize;
1872
1884
```
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
+ ```
1873
1896
"## ,
1874
1897
1875
1898
E0163 : r##"
You can’t perform that action at this time.
0 commit comments