Skip to content

Latest commit

 

History

History
26 lines (20 loc) · 612 Bytes

File metadata and controls

26 lines (20 loc) · 612 Bytes

An invalid number of generic parameters was passed to an intrinsic function.

Erroneous code example:

#![feature(intrinsics)]

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)]

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