librustc_typeck: fix fallout

This commit is contained in:
Jorge Aparicio 2014-12-09 08:51:04 -05:00
parent 1195708f64
commit 46272c18a2
2 changed files with 8 additions and 5 deletions

View File

@ -1938,11 +1938,13 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
infer::mk_subr(self.infcx(), origin, sub, sup)
}
pub fn type_error_message(&self,
sp: Span,
mk_msg: |String| -> String,
actual_ty: Ty<'tcx>,
err: Option<&ty::type_err<'tcx>>) {
pub fn type_error_message<M>(&self,
sp: Span,
mk_msg: M,
actual_ty: Ty<'tcx>,
err: Option<&ty::type_err<'tcx>>) where
M: FnOnce(String) -> String,
{
self.infcx().type_error_message(sp, mk_msg, actual_ty, err);
}

View File

@ -74,6 +74,7 @@ This API is completely unstable and subject to change.
#![feature(default_type_params, globs, import_shadowing, macro_rules, phase, quote)]
#![feature(slicing_syntax, unsafe_destructor)]
#![feature(rustc_diagnostic_macros)]
#![feature(unboxed_closures)]
#![allow(non_camel_case_types)]
#[phase(plugin, link)] extern crate log;