From 3f9fc39ab91a4d75b9499d3b3591db875649a0b7 Mon Sep 17 00:00:00 2001 From: Guillaume Gomez Date: Mon, 22 Jun 2015 18:34:52 +0200 Subject: [PATCH] Unify variadic errors --- src/librustc_typeck/astconv.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/librustc_typeck/astconv.rs b/src/librustc_typeck/astconv.rs index d42e4bc0834..f55998f12cd 100644 --- a/src/librustc_typeck/astconv.rs +++ b/src/librustc_typeck/astconv.rs @@ -1550,7 +1550,7 @@ pub fn ast_ty_to_ty<'tcx>(this: &AstConv<'tcx>, ast::TyParen(ref typ) => ast_ty_to_ty(this, rscope, &**typ), ast::TyBareFn(ref bf) => { if bf.decl.variadic && bf.abi != abi::C { - span_err!(tcx.sess, ast_ty.span, E0222, + span_err!(tcx.sess, ast_ty.span, E0045, "variadic function must have C calling convention"); } let bare_fn = ty_of_bare_fn(this, bf.unsafety, bf.abi, &*bf.decl);