]> git.lizzy.rs Git - rust.git/blob - compiler/rustc_error_codes/src/error_codes/E0044.md
Rollup merge of #93556 - dtolnay:trailingcomma, r=cjgillot
[rust.git] / compiler / rustc_error_codes / src / error_codes / E0044.md
1 You cannot use type or const parameters on foreign items.
2
3 Example of erroneous code:
4
5 ```compile_fail,E0044
6 extern "C" { fn some_func<T>(x: T); }
7 ```
8
9 To fix this, replace the generic parameter with the specializations that you
10 need:
11
12 ```
13 extern "C" { fn some_func_i32(x: i32); }
14 extern "C" { fn some_func_i64(x: i64); }
15 ```