@@ -36,14 +36,25 @@ unsafe impl<K, V> GcSafe for IndexMap<K, V> where
36
36
K : GcSafe + TraceImmutable + Eq + Hash , V : GcSafe {
37
37
const NEEDS_DROP : bool = true ; // IndexMap has internal memory
38
38
}
39
- unsafe impl < ' new_gc , Id , K , V > GcBrand < ' new_gc , Id > for IndexMap < K , V >
40
- where Id : CollectorId , K : TraceImmutable + Eq + Hash + GcBrand < ' new_gc , Id > ,
41
- V : GcBrand < ' new_gc , Id > ,
42
- <K as GcBrand < ' new_gc , Id > >:: Branded : TraceImmutable + Eq + Hash + Sized ,
43
- <V as GcBrand < ' new_gc , Id > >:: Branded : Sized {
39
+ unsafe impl < ' new_gc , Id , K , V > GcRebrand < ' new_gc , Id > for IndexMap < K , V >
40
+ where Id : CollectorId , K : TraceImmutable + Eq + Hash + GcRebrand < ' new_gc , Id > ,
41
+ V : GcRebrand < ' new_gc , Id > ,
42
+ <K as GcRebrand < ' new_gc , Id > >:: Branded : TraceImmutable + Eq + Hash + Sized ,
43
+ <V as GcRebrand < ' new_gc , Id > >:: Branded : Sized {
44
44
type Branded = IndexMap <
45
- <K as GcBrand < ' new_gc , Id > >:: Branded ,
46
- <V as GcBrand < ' new_gc , Id > >:: Branded
45
+ <K as GcRebrand < ' new_gc , Id > >:: Branded ,
46
+ <V as GcRebrand < ' new_gc , Id > >:: Branded
47
+ > ;
48
+ }
49
+
50
+ unsafe impl < ' a , Id , K , V > GcErase < ' a , Id > for IndexMap < K , V >
51
+ where Id : CollectorId , K : TraceImmutable + Eq + Hash + GcErase < ' a , Id > ,
52
+ V : GcErase < ' a , Id > ,
53
+ <K as GcErase < ' a , Id > >:: Erased : TraceImmutable + Eq + Hash + Sized ,
54
+ <V as GcErase < ' a , Id > >:: Erased : Sized {
55
+ type Erased = IndexMap <
56
+ <K as GcErase < ' a , Id > >:: Erased ,
57
+ <V as GcErase < ' a , Id > >:: Erased
47
58
> ;
48
59
}
49
60
@@ -70,8 +81,13 @@ unsafe impl<V> Trace for IndexSet<V>
70
81
Ok ( ( ) )
71
82
}
72
83
}
73
- unsafe impl < ' new_gc , Id , V > GcBrand < ' new_gc , Id > for IndexSet < V >
74
- where Id : CollectorId , V : GcBrand < ' new_gc , Id > + TraceImmutable + Eq + Hash ,
75
- <V as GcBrand < ' new_gc , Id > >:: Branded : TraceImmutable + Eq + Hash , {
76
- type Branded = IndexSet < <V as GcBrand < ' new_gc , Id > >:: Branded > ;
84
+ unsafe impl < ' new_gc , Id , V > GcRebrand < ' new_gc , Id > for IndexSet < V >
85
+ where Id : CollectorId , V : GcRebrand < ' new_gc , Id > + TraceImmutable + Eq + Hash ,
86
+ <V as GcRebrand < ' new_gc , Id > >:: Branded : TraceImmutable + Eq + Hash , {
87
+ type Branded = IndexSet < <V as GcRebrand < ' new_gc , Id > >:: Branded > ;
88
+ }
89
+ unsafe impl < ' a , Id , V > GcErase < ' a , Id > for IndexSet < V >
90
+ where Id : CollectorId , V : GcErase < ' a , Id > + TraceImmutable + Eq + Hash ,
91
+ <V as GcErase < ' a , Id > >:: Erased : TraceImmutable + Eq + Hash , {
92
+ type Erased = IndexSet < <V as GcErase < ' a , Id > >:: Erased > ;
77
93
}
0 commit comments