Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 6 additions & 7 deletions src/librustc_data_structures/obligation_forest/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,9 @@ which includes three bits of information:

#### Snapshots

The `ObligationForest` supports a limited form of snapshots; see
`start_snapshot`; `commit_snapshot`; and `rollback_snapshot`. In
particular, you can use a snapshot to roll back new root
obligations. However, it is an error to attempt to
`process_obligations` during a snapshot.
The `ObligationForest` supports snapshots; see
`start_snapshot`; `commit_snapshot`; and `rollback_snapshot`. Snapshots roll
back all externally visible state.

### Implementation details

Expand All @@ -74,7 +72,8 @@ the forest is stored in a vector. Each element of the vector is a node
in some tree. Each node in the vector has the index of an (optional)
parent and (for convenience) its root (which may be itself). It also
has a current state, described by `NodeState`. After each
processing step, we compress the vector to remove completed and error
nodes, which aren't needed anymore.
processing step, we compress the vector to remove completed and error nodes (or
mark as 'popped' if we can't remove due to snapshotting), which aren't needed
anymore.


Loading