Skip to content

Commit 46272c1

Browse files
author
Jorge Aparicio
committed
librustc_typeck: fix fallout
1 parent 1195708 commit 46272c1

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

src/librustc_typeck/check/mod.rs

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1938,11 +1938,13 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
19381938
infer::mk_subr(self.infcx(), origin, sub, sup)
19391939
}
19401940

1941-
pub fn type_error_message(&self,
1942-
sp: Span,
1943-
mk_msg: |String| -> String,
1944-
actual_ty: Ty<'tcx>,
1945-
err: Option<&ty::type_err<'tcx>>) {
1941+
pub fn type_error_message<M>(&self,
1942+
sp: Span,
1943+
mk_msg: M,
1944+
actual_ty: Ty<'tcx>,
1945+
err: Option<&ty::type_err<'tcx>>) where
1946+
M: FnOnce(String) -> String,
1947+
{
19461948
self.infcx().type_error_message(sp, mk_msg, actual_ty, err);
19471949
}
19481950

src/librustc_typeck/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ This API is completely unstable and subject to change.
7474
#![feature(default_type_params, globs, import_shadowing, macro_rules, phase, quote)]
7575
#![feature(slicing_syntax, unsafe_destructor)]
7676
#![feature(rustc_diagnostic_macros)]
77+
#![feature(unboxed_closures)]
7778
#![allow(non_camel_case_types)]
7879

7980
#[phase(plugin, link)] extern crate log;

0 commit comments

Comments
 (0)