- /// Executes `f` and commit the bindings.
- #[instrument(skip(self, f), level = "debug")]
- pub fn commit_unconditionally<R, F>(&self, f: F) -> R
- where
- F: FnOnce(&CombinedSnapshot<'a, 'tcx>) -> R,
- {
- let snapshot = self.start_snapshot();
- let r = f(&snapshot);
- self.commit_from(snapshot);
- r
- }
-