@@ -385,38 +385,36 @@ impl<'a> CoverageSpansGenerator<'a> {
385385 self . refined_spans . push ( macro_name_cov) ;
386386 }
387387
388+ #[ track_caller]
388389 fn curr ( & self ) -> & CoverageSpan {
389- self . some_curr
390- . as_ref ( )
391- . unwrap_or_else ( || bug ! ( "invalid attempt to unwrap a None some_curr" ) )
390+ self . some_curr . as_ref ( ) . unwrap_or_else ( || bug ! ( "some_curr is None (curr)" ) )
392391 }
393392
393+ #[ track_caller]
394394 fn curr_mut ( & mut self ) -> & mut CoverageSpan {
395- self . some_curr
396- . as_mut ( )
397- . unwrap_or_else ( || bug ! ( "invalid attempt to unwrap a None some_curr" ) )
395+ self . some_curr . as_mut ( ) . unwrap_or_else ( || bug ! ( "some_curr is None (curr_mut)" ) )
398396 }
399397
400398 /// If called, then the next call to `next_coverage_span()` will *not* update `prev` with the
401399 /// `curr` coverage span.
400+ #[ track_caller]
402401 fn take_curr ( & mut self ) -> CoverageSpan {
403- self . some_curr . take ( ) . unwrap_or_else ( || bug ! ( "invalid attempt to unwrap a None some_curr " ) )
402+ self . some_curr . take ( ) . unwrap_or_else ( || bug ! ( "some_curr is None (take_curr) " ) )
404403 }
405404
405+ #[ track_caller]
406406 fn prev ( & self ) -> & CoverageSpan {
407- self . some_prev
408- . as_ref ( )
409- . unwrap_or_else ( || bug ! ( "invalid attempt to unwrap a None some_prev" ) )
407+ self . some_prev . as_ref ( ) . unwrap_or_else ( || bug ! ( "some_prev is None (prev)" ) )
410408 }
411409
410+ #[ track_caller]
412411 fn prev_mut ( & mut self ) -> & mut CoverageSpan {
413- self . some_prev
414- . as_mut ( )
415- . unwrap_or_else ( || bug ! ( "invalid attempt to unwrap a None some_prev" ) )
412+ self . some_prev . as_mut ( ) . unwrap_or_else ( || bug ! ( "some_prev is None (prev_mut)" ) )
416413 }
417414
415+ #[ track_caller]
418416 fn take_prev ( & mut self ) -> CoverageSpan {
419- self . some_prev . take ( ) . unwrap_or_else ( || bug ! ( "invalid attempt to unwrap a None some_prev " ) )
417+ self . some_prev . take ( ) . unwrap_or_else ( || bug ! ( "some_prev is None (take_prev) " ) )
420418 }
421419
422420 /// If there are `pending_dups` but `prev` is not a matching dup (`prev.span` doesn't match the
0 commit comments