@@ -904,7 +904,7 @@ impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx> {
904904 if let Some ( ref expr) = local. init {
905905 if let hir:: ExprKind :: Index ( _, _) = expr. node {
906906 if let Ok ( snippet) = self . tcx . sess . source_map ( ) . span_to_snippet ( expr. span ) {
907- err. span_suggestion_with_applicability (
907+ err. span_suggestion (
908908 expr. span ,
909909 "consider borrowing here" ,
910910 format ! ( "&{}" , snippet) ,
@@ -952,7 +952,7 @@ impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx> {
952952 let format_str = format ! ( "consider removing {} leading `&`-references" ,
953953 remove_refs) ;
954954
955- err. span_suggestion_short_with_applicability (
955+ err. span_suggestion_short (
956956 sp, & format_str, String :: new ( ) , Applicability :: MachineApplicable
957957 ) ;
958958 break ;
@@ -1109,7 +1109,7 @@ impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx> {
11091109 // For example, if `expected_args_length` is 2, suggest `|_, _|`.
11101110 if found_args. is_empty ( ) && is_closure {
11111111 let underscores = vec ! [ "_" ; expected_args. len( ) ] . join ( ", " ) ;
1112- err. span_suggestion_with_applicability (
1112+ err. span_suggestion (
11131113 pipe_span,
11141114 & format ! (
11151115 "consider changing the closure to take and ignore the expected argument{}" ,
@@ -1130,11 +1130,12 @@ impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx> {
11301130 . map ( |( name, _) | name. to_owned ( ) )
11311131 . collect :: < Vec < String > > ( )
11321132 . join ( ", " ) ;
1133- err. span_suggestion_with_applicability ( found_span,
1134- "change the closure to take multiple \
1135- arguments instead of a single tuple",
1136- format ! ( "|{}|" , sugg) ,
1137- Applicability :: MachineApplicable ) ;
1133+ err. span_suggestion (
1134+ found_span,
1135+ "change the closure to take multiple arguments instead of a single tuple" ,
1136+ format ! ( "|{}|" , sugg) ,
1137+ Applicability :: MachineApplicable ,
1138+ ) ;
11381139 }
11391140 }
11401141 if let & [ ArgKind :: Tuple ( _, ref fields) ] = & expected_args[ ..] {
@@ -1162,12 +1163,11 @@ impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx> {
11621163 String :: new( )
11631164 } ,
11641165 ) ;
1165- err. span_suggestion_with_applicability (
1166+ err. span_suggestion (
11661167 found_span,
1167- "change the closure to accept a tuple instead of \
1168- individual arguments",
1168+ "change the closure to accept a tuple instead of individual arguments" ,
11691169 sugg,
1170- Applicability :: MachineApplicable
1170+ Applicability :: MachineApplicable ,
11711171 ) ;
11721172 }
11731173 }
0 commit comments