rollup merge of #18409 : gamazeps/issue15273

This commit is contained in:
Alex Crichton 2014-10-30 08:57:36 -07:00
commit ce63fbc7bd
3 changed files with 15 additions and 4 deletions

View file

@ -1,4 +1,4 @@
// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
@ -282,7 +282,9 @@ impl<'cx, 'tcx> WritebackCx<'cx, 'tcx> {
}
_ => {
span_err!(self.tcx().sess, reason.span(self.tcx()), E0100,
"cannot coerce non-statically resolved bare fn");
"cannot coerce non-statically resolved bare fn to closure");
span_help!(self.tcx().sess, reason.span(self.tcx()),
"consider embedding the function in a closure");
}
}