Skip to content

Commit

Permalink
Rollup merge of rust-lang#35646 - theypsilon:master, r=jonathandturner
Browse files Browse the repository at this point in the history
E0094 error message updated

Part of rust-lang#35233
Fixes rust-lang#35231

r? @jonathandturner
  • Loading branch information
eddyb authored Aug 14, 2016
2 parents 50aa568 + 85388f0 commit f73f128
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/librustc_typeck/check/intrinsic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
1 change: 1 addition & 0 deletions src/test/compile-fail/E0094.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#![feature(intrinsics)]
extern "rust-intrinsic" {
fn size_of<T, U>() -> usize; //~ ERROR E0094
//~| NOTE expected 1 type parameter
}

fn main() {
Expand Down

0 comments on commit f73f128

Please sign in to comment.