E0094 error message updated

Part of #35233
Fixes #35231
This commit is contained in:
José manuel Barroso Galindo 2016-08-13 16:32:43 +07:00
parent d3c3de8abe
commit 85388f0958
2 changed files with 5 additions and 2 deletions

View File

@ -51,10 +51,12 @@ fn equate_intrinsic_type<'a, 'tcx>(ccx: &CrateCtxt<'a, 'tcx>,
}));
let i_n_tps = i_ty.generics.types.len(subst::FnSpace);
if i_n_tps != n_tps {
span_err!(tcx.sess, it.span, E0094,
struct_span_err!(tcx.sess, it.span, E0094,
"intrinsic has wrong number of type \
parameters: found {}, expected {}",
i_n_tps, n_tps);
i_n_tps, n_tps)
.span_label(it.span, &format!("expected {} type parameter", n_tps))
.emit();
} else {
require_same_types(ccx,
TypeOrigin::IntrinsicType(it.span),

View File

@ -11,6 +11,7 @@
#![feature(intrinsics)]
extern "rust-intrinsic" {
fn size_of<T, U>() -> usize; //~ ERROR E0094
//~| NOTE expected 1 type parameter
}
fn main() {