#![feature(ref_slice)]
#![feature(rustc_diagnostic_macros)]
#![feature(rustc_private)]
-#![feature(slice_extras)]
+#![feature(slice_splits)]
#![feature(staged_api)]
#![feature(vec_push_all)]
#![feature(cell_extras)]
}
}
+fn require_c_abi_if_variadic(tcx: &ty::ctxt,
+ decl: &ast::FnDecl,
+ abi: abi::Abi,
+ span: Span) {
+ if decl.variadic && abi != abi::C {
+ span_err!(tcx.sess, span, E0045,
+ "variadic function must have C calling convention");
+ }
+}
+
fn require_same_types<'a, 'tcx, M>(tcx: &ty::ctxt<'tcx>,
maybe_infcx: Option<&infer::InferCtxt<'a, 'tcx>>,
t1_is_expected: bool,
{
let result = match maybe_infcx {
None => {
- let infcx = infer::new_infer_ctxt(tcx, &tcx.tables, None);
+ let infcx = infer::new_infer_ctxt(tcx, &tcx.tables, None, false);
infer::mk_eqty(&infcx, t1_is_expected, infer::Misc(span), t1, t2)
}
Some(infcx) => {