diff options
| author | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2015-06-30 10:44:20 +0200 |
|---|---|---|
| committer | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2015-06-30 19:21:22 +0200 |
| commit | ed6940fd384b1e42c3e3ad229e022af2e13b79c7 (patch) | |
| tree | f2d304d03b28328834ca1ec5b61ab33fd3960389 | |
| parent | 20f22b7f0e29068414933dd6d41c6a5785d3fd75 (diff) | |
| download | rust-ed6940fd384b1e42c3e3ad229e022af2e13b79c7.tar.gz rust-ed6940fd384b1e42c3e3ad229e022af2e13b79c7.zip | |
Add E0094 error explanation
| -rw-r--r-- | src/librustc_typeck/diagnostics.rs | 30 |
1 files changed, 27 insertions, 3 deletions
diff --git a/src/librustc_typeck/diagnostics.rs b/src/librustc_typeck/diagnostics.rs index 57fbd52f71f..4d3d18cb16c 100644 --- a/src/librustc_typeck/diagnostics.rs +++ b/src/librustc_typeck/diagnostics.rs @@ -1029,7 +1029,7 @@ You called an unknown intrinsic function. Erroneous code example: #![feature(intrinsics)] extern "rust-intrinsic" { - fn foo(); + fn foo(); // error: unrecognized intrinsic function: `foo` } fn main() { @@ -1047,7 +1047,7 @@ libcore/intrinsics.rs. Example: #![feature(intrinsics)] extern "rust-intrinsic" { - fn atomic_fence(); + fn atomic_fence(); // ok! } fn main() { @@ -1058,6 +1058,31 @@ fn main() { ``` "##, +E0094: r##" +You gave an invalid number of type parameters to an intrinsic function. +Erroneous code example: + +``` +#![feature(intrinsics)] + +extern "rust-intrinsic" { + fn size_of<T, U>() -> usize; // error: intrinsic has wrong number + // of type parameters +} +``` + +Please check you give the right number of lifetime parameters and/or the +function definition. Example: + +``` +#![feature(intrinsics)] + +extern "rust-intrinsic" { + fn size_of<T>() -> usize; // ok! +} +``` +"##, + E0106: r##" This error indicates that a lifetime is missing from a type. If it is an error inside a function signature, the problem may be with failing to adhere to the @@ -1724,7 +1749,6 @@ register_diagnostics! { E0086, E0090, E0092, - E0094, E0101, E0102, E0103, |
