@@ -288,10 +288,9 @@ impl<'tcx> ty::ctxt<'tcx> {
288
288
let found_str = values. found . sort_string ( self ) ;
289
289
if expected_str == found_str && expected_str == "closure" {
290
290
self . sess . span_note ( sp,
291
- & format ! ( "no two closures, even if identical, have the same type" ) ) ;
291
+ "no two closures, even if identical, have the same type" ) ;
292
292
self . sess . span_help ( sp,
293
- & format ! ( "consider boxing your closure and/or \
294
- using it as a trait object") ) ;
293
+ "consider boxing your closure and/or using it as a trait object" ) ;
295
294
}
296
295
} ,
297
296
TyParamDefaultMismatch ( values) => {
@@ -307,8 +306,7 @@ impl<'tcx> ty::ctxt<'tcx> {
307
306
. and_then ( |node_id| self . map . opt_span ( node_id) )
308
307
{
309
308
Some ( span) => {
310
- self . sess . span_note ( span,
311
- & format ! ( "a default was defined here..." ) ) ;
309
+ self . sess . span_note ( span, "a default was defined here..." ) ;
312
310
}
313
311
None => {
314
312
self . sess . note (
@@ -319,15 +317,14 @@ impl<'tcx> ty::ctxt<'tcx> {
319
317
320
318
self . sess . span_note (
321
319
expected. origin_span ,
322
- & format ! ( "...that was applied to an unconstrained type variable here" ) ) ;
320
+ "...that was applied to an unconstrained type variable here" ) ;
323
321
324
322
match
325
323
self . map . as_local_node_id ( found. def_id )
326
324
. and_then ( |node_id| self . map . opt_span ( node_id) )
327
325
{
328
326
Some ( span) => {
329
- self . sess . span_note ( span,
330
- & format ! ( "a second default was defined here..." ) ) ;
327
+ self . sess . span_note ( span, "a second default was defined here..." ) ;
331
328
}
332
329
None => {
333
330
self . sess . note (
@@ -338,7 +335,7 @@ impl<'tcx> ty::ctxt<'tcx> {
338
335
339
336
self . sess . span_note (
340
337
found. origin_span ,
341
- & format ! ( "...that also applies to the same type variable here" ) ) ;
338
+ "...that also applies to the same type variable here" ) ;
342
339
}
343
340
_ => { }
344
341
}
0 commit comments