[]Module rustc_data_structures::undo_log

Module which contains the snapshot/rollback functionality of the ena data structures.

For most usecases this is just an internal implementation detail. However if many ena data structures are used snapshotted simultaneously it is possible to use UnificationTableStorage/SnapshotVecStorage instead and use a custom UndoLogs<T> type capable of recording the actions of all used data structures.

Since the *Storage variants do not have an undo log with_log must be called with the unified log before any mutating actions.



Snapshots are tokens that should be created/consumed linearly.


A basic undo log.



A trait implemented for storage types (like SnapshotVecStorage) which can be rolled back using actions of type U.


A trait which extends UndoLogs to allow snapshots to be done at specific points. Each snapshot can then be used to rollback any changes to an underlying data structures if they were not desirable.


A trait which allows undo actions (T) to be pushed which can be used to rollback actio at a later time if needed.