]> git.proxmox.com Git - rustc.git/blame - compiler/rustc_error_codes/src/error_codes/E0094.md
New upstream version 1.74.1+dfsg1
[rustc.git] / compiler / rustc_error_codes / src / error_codes / E0094.md
CommitLineData
136023e0 1An invalid number of generic parameters was passed to an intrinsic function.
60c5eb7d
XL
2
3Erroneous code example:
4
5```compile_fail,E0094
781aab86 6#![feature(intrinsics, rustc_attrs)]
add651ee 7#![allow(internal_features)]
60c5eb7d
XL
8
9extern "rust-intrinsic" {
2b03887a 10 #[rustc_safe_intrinsic]
60c5eb7d
XL
11 fn size_of<T, U>() -> usize; // error: intrinsic has wrong number
12 // of type parameters
13}
14```
15
16Please check that you provided the right number of type parameters
17and verify with the function declaration in the Rust source code.
18Example:
19
20```
781aab86 21#![feature(intrinsics, rustc_attrs)]
add651ee 22#![allow(internal_features)]
60c5eb7d
XL
23
24extern "rust-intrinsic" {
2b03887a 25 #[rustc_safe_intrinsic]
60c5eb7d
XL
26 fn size_of<T>() -> usize; // ok!
27}
28```