W3cubDocs

/Rust

Error code E0094

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

Erroneous code example:

#![allow(unused)]
#![feature(intrinsics)]
#![allow(internal_features)]

fn main() {
#[rustc_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:

#![allow(unused)]
#![feature(intrinsics)]
#![allow(internal_features)]

fn main() {
#[rustc_intrinsic]
fn size_of<T>() -> usize; // ok!
}

© 2010 The Rust Project Developers
Licensed under the Apache License, Version 2.0 or the MIT license, at your option.
https://doc.rust-lang.org/error_codes/E0094.html