]> git.proxmox.com Git - rustc.git/blob - src/librustc_error_codes/error_codes/E0132.md
New upstream version 1.47.0+dfsg1
[rustc.git] / src / librustc_error_codes / error_codes / E0132.md
1 A function with the `start` attribute was declared with type parameters.
2
3 Erroneous code example:
4
5 ```compile_fail,E0132
6 #![feature(start)]
7
8 #[start]
9 fn f<T>() {}
10 ```
11
12 It is not possible to declare type parameters on a function that has the `start`
13 attribute. Such a function must have the following type signature (for more
14 information, view [the unstable book][1]):
15
16 [1]: https://doc.rust-lang.org/unstable-book/language-features/lang-items.html#writing-an-executable-without-stdlib
17
18 ```
19 # let _:
20 fn(isize, *const *const u8) -> isize;
21 ```
22
23 Example:
24
25 ```
26 #![feature(start)]
27
28 #[start]
29 fn my_start(argc: isize, argv: *const *const u8) -> isize {
30 0
31 }
32 ```