Closed
Description
The current approach (8cbdaf4) puts a span in the block_ctxt record, probably because that's already being passed around. The two have very little to do with each other though, and the re-creating of block contexts makes it very easy to accidentally drop cleanups. In my upcoming patch, I am removing a few instances of code writing to an immutable box (which is currently not checked but about to become checked). We could make all boxes of block contexts mutable, but that's ugly and doesn't solve the underlying problem -- there is no single span associated with a block context.
So probably we'll have to pass spans around separately in a lot of places.