]> git.lizzy.rs Git - rust.git/blob - src/librustc_error_codes/error_codes/E0044.md
Rollup merge of #62514 - stephaneyfx:box-ffi, r=nikomatsakis
[rust.git] / src / librustc_error_codes / 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 { 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 { fn some_func_i32(x: i32); }
14 extern { fn some_func_i64(x: i64); }
15 ```