]> git.lizzy.rs Git - rust.git/commitdiff
Unify variadic errors
authorGuillaume Gomez <guillaume1.gomez@gmail.com>
Mon, 22 Jun 2015 16:34:52 +0000 (18:34 +0200)
committerGuillaume Gomez <guillaume1.gomez@gmail.com>
Mon, 22 Jun 2015 16:34:52 +0000 (18:34 +0200)
src/librustc_typeck/astconv.rs

index d42e4bc0834844169c2ec8bbb1f73971cf015493..f55998f12cda7981af30c86666b2335b023372e7 100644 (file)
@@ -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);