summaryrefslogtreecommitdiffstats
path: root/compiler/rustc_error_codes/src/error_codes/E0094.md
blob: d8c1a3cb55cb5ceb62441e90608de78c293dad05 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
An invalid number of generic parameters was passed to an intrinsic function.

Erroneous code example:

```compile_fail,E0094
#![feature(intrinsics, rustc_attrs)]
#![allow(internal_features)]

extern "rust-intrinsic" {
    #[rustc_safe_intrinsic]
    fn size_of<T, U>() -> usize; // error: intrinsic has wrong number
                                 //        of type parameters
}
```

Please check that you provided the right number of type parameters
and verify with the function declaration in the Rust source code.
Example:

```
#![feature(intrinsics, rustc_attrs)]
#![allow(internal_features)]

extern "rust-intrinsic" {
    #[rustc_safe_intrinsic]
    fn size_of<T>() -> usize; // ok!
}
```