diff options
| author | bors <bors@rust-lang.org> | 2018-05-18 02:58:13 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2018-05-18 02:58:13 +0000 |
| commit | dfc07a48f6797a20b3ee04fcff6f6c64bf0443bc (patch) | |
| tree | b0356d0003fb9a5038bb884761df87d496b1b836 /src/librustc_data_structures | |
| parent | bedbf727855d099963b66cf6619a53d3c073f52a (diff) | |
| parent | faa1f212981d46d7bddd25c9b633193f4227d526 (diff) | |
| download | rust-dfc07a48f6797a20b3ee04fcff6f6c64bf0443bc.tar.gz rust-dfc07a48f6797a20b3ee04fcff6f6c64bf0443bc.zip | |
Auto merge of #50847 - Mark-Simulacrum:rollup, r=Mark-Simulacrum
Rollup of 10 pull requests Successful merges: - #50387 (Remove leftover tab in libtest outputs) - #50553 (Add Option::xor method) - #50610 (Improve format string errors) - #50649 (Tweak `nearest_common_ancestor()`.) - #50790 (Fix grammar documentation wrt Unicode identifiers) - #50791 (Fix null exclusions in grammar docs) - #50806 (Add `bless` x.py subcommand for easy ui test replacement) - #50818 (Speed up `opt_normalize_projection_type`) - #50837 (Revert #49767) - #50839 (Make sure people know the book is free oline) Failed merges:
Diffstat (limited to 'src/librustc_data_structures')
| -rw-r--r-- | src/librustc_data_structures/snapshot_map/mod.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/librustc_data_structures/snapshot_map/mod.rs b/src/librustc_data_structures/snapshot_map/mod.rs index cede6f14782..6ee8c3579f5 100644 --- a/src/librustc_data_structures/snapshot_map/mod.rs +++ b/src/librustc_data_structures/snapshot_map/mod.rs @@ -67,6 +67,12 @@ impl<K, V> SnapshotMap<K, V> } } + pub fn insert_noop(&mut self) { + if !self.undo_log.is_empty() { + self.undo_log.push(UndoLog::Noop); + } + } + pub fn remove(&mut self, key: K) -> bool { match self.map.remove(&key) { Some(old_value) => { |
