File tree 1 file changed +10
-0
lines changed
1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change 33
33
34
34
use std:: marker;
35
35
use std:: fmt:: Debug ;
36
+ use std:: ops:: Range ;
36
37
37
38
mod backing_vec;
38
39
pub use self :: backing_vec:: { InPlace , UnificationStore } ;
@@ -299,6 +300,15 @@ impl<S: UnificationStore> UnificationTable<S> {
299
300
self . values . len ( )
300
301
}
301
302
303
+ /// Returns the keys of all variables created since the `snapshot`.
304
+ pub fn vars_since_snapshot (
305
+ & self ,
306
+ snapshot : & Snapshot < S > ,
307
+ ) -> Range < S :: Key > {
308
+ let range = self . values . values_since_snapshot ( & snapshot. snapshot ) ;
309
+ S :: Key :: from_index ( range. start as u32 ) ..S :: Key :: from_index ( range. end as u32 )
310
+ }
311
+
302
312
/// Obtains the current value for a particular key.
303
313
/// Not for end-users; they can use `probe_value`.
304
314
fn value ( & self , key : S :: Key ) -> & VarValue < S :: Key > {
You can’t perform that action at this time.
0 commit comments