Update span_label call to new api

This commit is contained in:
Jonathan Turner 2016-05-13 09:27:35 -07:00
parent 1b6afd1e42
commit ecadd7e957

View File

@ -199,8 +199,8 @@ pub fn emit_type_err<'a, 'gcx, 'tcx>(tcx: TyCtxt<'a, 'gcx, 'tcx>,
terr: &ty::error::TypeError<'tcx>,
msg: &str) {
let mut err = struct_span_err!(tcx.sess, span, E0211, "{}", msg);
err = err.span_label(span, &terr);
err = err.note_expected_found(&"type", &expected_ty, &found_ty);
err.span_label(span, &terr);
err.note_expected_found(&"type", &expected_ty, &found_ty);
tcx.note_and_explain_type_err(&mut err, terr, span);
err.emit();
}