@@ -221,7 +221,10 @@ impl AllocHistory {
221221impl < ' history , ' ecx , ' mir , ' tcx > DiagnosticCx < ' history , ' ecx , ' mir , ' tcx > {
222222 pub fn start_grant ( & mut self , perm : Permission ) {
223223 let Operation :: Retag ( op) = & mut self . operation else {
224- unreachable ! ( "start_grant must only be called during a retag, this is: {:?}" , self . operation)
224+ unreachable ! (
225+ "start_grant must only be called during a retag, this is: {:?}" ,
226+ self . operation
227+ )
225228 } ;
226229 op. permission = Some ( perm) ;
227230
@@ -286,7 +289,8 @@ impl<'history, 'ecx, 'mir, 'tcx> DiagnosticCx<'history, 'ecx, 'mir, 'tcx> {
286289 tag : BorTag ,
287290 protector_tag : Option < BorTag > ,
288291 ) -> Option < TagHistory > {
289- let Some ( created) = self . history
292+ let Some ( created) = self
293+ . history
290294 . creations
291295 . iter ( )
292296 . rev ( )
@@ -315,22 +319,27 @@ impl<'history, 'ecx, 'mir, 'tcx> DiagnosticCx<'history, 'ecx, 'mir, 'tcx> {
315319 None
316320 }
317321 } )
318- } ) . or_else ( || {
322+ } )
323+ . or_else ( || {
319324 // If we didn't find a retag that created this tag, it might be the base tag of
320325 // this allocation.
321326 if self . history . base . 0 . tag ( ) == tag {
322327 Some ( (
323- format ! ( "{tag:?} was created here, as the base tag for {:?}" , self . history. id) ,
324- self . history . base . 1 . data ( )
328+ format ! (
329+ "{tag:?} was created here, as the base tag for {:?}" ,
330+ self . history. id
331+ ) ,
332+ self . history . base . 1 . data ( ) ,
325333 ) )
326334 } else {
327335 None
328336 }
329- } ) else {
330- // But if we don't have a creation event, this is related to a wildcard, and there
331- // is really nothing we can do to help.
332- return None ;
333- } ;
337+ } )
338+ else {
339+ // But if we don't have a creation event, this is related to a wildcard, and there
340+ // is really nothing we can do to help.
341+ return None ;
342+ } ;
334343
335344 let invalidated = self . history . invalidations . iter ( ) . rev ( ) . find_map ( |event| {
336345 if event. tag == tag { Some ( event. generate_diagnostic ( ) ) } else { None }
0 commit comments