@@ -299,11 +299,12 @@ impl<'a, 'gcx, 'tcx> CastCheck<'tcx> {
299299 err. note ( "The type information given here is insufficient to check whether \
300300 the pointer cast is valid") ;
301301 if unknown_cast_to {
302- err. span_suggestion_short_with_applicability ( self . cast_span ,
303- "consider giving more type information" ,
304- String :: new ( ) ,
305- Applicability :: Unspecified ,
306- ) ;
302+ err. span_suggestion_short_with_applicability (
303+ self . cast_span ,
304+ "consider giving more type information" ,
305+ String :: new ( ) ,
306+ Applicability :: Unspecified ,
307+ ) ;
307308 }
308309 err. emit ( ) ;
309310 }
@@ -329,11 +330,12 @@ impl<'a, 'gcx, 'tcx> CastCheck<'tcx> {
329330 if self . cast_ty . is_trait ( ) {
330331 match fcx. tcx . sess . source_map ( ) . span_to_snippet ( self . cast_span ) {
331332 Ok ( s) => {
332- err. span_suggestion_with_applicability ( self . cast_span ,
333- "try casting to a reference instead" ,
334- format ! ( "&{}{}" , mtstr, s) ,
335- Applicability :: MachineApplicable ,
336- ) ;
333+ err. span_suggestion_with_applicability (
334+ self . cast_span ,
335+ "try casting to a reference instead" ,
336+ format ! ( "&{}{}" , mtstr, s) ,
337+ Applicability :: MachineApplicable ,
338+ ) ;
337339 }
338340 Err ( _) => {
339341 span_help ! ( err, self . cast_span, "did you mean `&{}{}`?" , mtstr, tstr)
@@ -350,11 +352,12 @@ impl<'a, 'gcx, 'tcx> CastCheck<'tcx> {
350352 ty:: Adt ( def, ..) if def. is_box ( ) => {
351353 match fcx. tcx . sess . source_map ( ) . span_to_snippet ( self . cast_span ) {
352354 Ok ( s) => {
353- err. span_suggestion_with_applicability ( self . cast_span ,
354- "try casting to a `Box` instead" ,
355- format ! ( "Box<{}>" , s) ,
356- Applicability :: MachineApplicable ,
357- ) ;
355+ err. span_suggestion_with_applicability (
356+ self . cast_span ,
357+ "try casting to a `Box` instead" ,
358+ format ! ( "Box<{}>" , s) ,
359+ Applicability :: MachineApplicable ,
360+ ) ;
358361 }
359362 Err ( _) => span_help ! ( err, self . cast_span, "did you mean `Box<{}>`?" , tstr) ,
360363 }
0 commit comments