290pub struct RefTracking<T, PATH = ()> {
291 seen: FxHashSet<T>,
292▶ todo: Vec<(T, PATH)>,
293}
294
· · ·
295impl<T: Clone + Eq + Hash + std::fmt::Debug, PATH> RefTracking<T, PATH> {
296 pub fn empty() -> Self {
297▶ RefTracking { seen: FxHashSet::default(), todo: vec![] }
298 }
299 pub fn next(&mut self) -> Option<(T, PATH)> {
· · ·
300▶ self.todo.pop()
301 }
302
· · ·
306 let path = path();
307 // Remember to come back to this later.
308▶ self.todo.push((val, path));
309 }
310 }
· · ·
314 pub fn new(val: T, ty: Ty<'tcx>) -> Self {
315 let mut ref_tracking_for_consts =
316▶ RefTracking { seen: FxHashSet::default(), todo: vec![(val.clone(), Path::new(ty))] };
317 ref_tracking_for_consts.seen.insert(val);
318 ref_tracking_for_consts
+ 2 more matches in this file