@@ -158,7 +158,7 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
158158 } else if reinits > 1 {
159159 err. span_note (
160160 MultiSpan :: from_spans ( reinit_spans) ,
161- & if reinits <= 3 {
161+ if reinits <= 3 {
162162 format ! ( "these {reinits} reinitializations might get skipped" )
163163 } else {
164164 format ! (
@@ -253,7 +253,7 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
253253 // We have a `&mut` ref, we need to reborrow on each iteration (#62112).
254254 err. span_suggestion_verbose (
255255 span. shrink_to_lo ( ) ,
256- & format ! (
256+ format ! (
257257 "consider creating a fresh reborrow of {} here" ,
258258 self . describe_place( moved_place)
259259 . map( |n| format!( "`{n}`" ) )
@@ -304,7 +304,7 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
304304 ..
305305 } = use_spans
306306 {
307- err. note ( & format ! (
307+ err. note ( format ! (
308308 "{} occurs due to deref coercion to `{deref_target_ty}`" ,
309309 desired_action. as_noun( ) ,
310310 ) ) ;
@@ -586,7 +586,7 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
586586 // _ => {} // We don't want to point to this.
587587 // };
588588 // ```
589- err. span_label ( sp, & label) ;
589+ err. span_label ( sp, label) ;
590590 shown = true ;
591591 }
592592 }
@@ -1139,7 +1139,7 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
11391139 }
11401140
11411141 if union_type_name != "" {
1142- err. note ( & format ! (
1142+ err. note ( format ! (
11431143 "{} is a field of the union `{}`, so it overlaps the field {}" ,
11441144 msg_place, union_type_name, msg_borrow,
11451145 ) ) ;
@@ -1238,14 +1238,14 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
12381238 }
12391239 err. span_help (
12401240 inner_call_span,
1241- & format ! (
1241+ format ! (
12421242 "try adding a local storing this{}..." ,
12431243 if use_span. is_some( ) { "" } else { " argument" }
12441244 ) ,
12451245 ) ;
12461246 err. span_help (
12471247 outer_call_span,
1248- & format ! (
1248+ format ! (
12491249 "...and then using that local {}" ,
12501250 if use_span. is_some( ) { "here" } else { "as the argument to this call" }
12511251 ) ,
@@ -2281,7 +2281,7 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
22812281 ) ;
22822282 err. span_suggestion_verbose (
22832283 sugg_span,
2284- & format ! (
2284+ format ! (
22852285 "to force the {} to take ownership of {} (and any \
22862286 other referenced variables), use the `move` keyword",
22872287 kind, captured_var
@@ -2293,7 +2293,7 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
22932293 match category {
22942294 ConstraintCategory :: Return ( _) | ConstraintCategory :: OpaqueType => {
22952295 let msg = format ! ( "{} is returned here" , kind) ;
2296- err. span_note ( constraint_span, & msg) ;
2296+ err. span_note ( constraint_span, msg) ;
22972297 }
22982298 ConstraintCategory :: CallArgument ( _) => {
22992299 fr_name. highlight_region_name ( & mut err) ;
@@ -2304,7 +2304,7 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
23042304 ) ;
23052305 } else {
23062306 let msg = format ! ( "{scope} requires argument type to outlive `{fr_name}`" ) ;
2307- err. span_note ( constraint_span, & msg) ;
2307+ err. span_note ( constraint_span, msg) ;
23082308 }
23092309 }
23102310 _ => bug ! (
@@ -2626,7 +2626,7 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
26262626 } ) ;
26272627 if let Some ( Ok ( instance) ) = deref_target {
26282628 let deref_target_ty = instance. ty ( tcx, self . param_env ) ;
2629- err. note ( & format ! (
2629+ err. note ( format ! (
26302630 "borrow occurs due to deref coercion to `{}`" ,
26312631 deref_target_ty
26322632 ) ) ;
@@ -3180,7 +3180,7 @@ impl<'tcx> AnnotatedBorrowFnSignature<'tcx> {
31803180
31813181 diag. span_label ( * return_span, format ! ( "also has lifetime `{}`" , region_name, ) ) ;
31823182
3183- diag. help ( & format ! (
3183+ diag. help ( format ! (
31843184 "use data from the highlighted arguments which match the `{}` lifetime of \
31853185 the return type",
31863186 region_name,
0 commit comments