Skip to content

Commit 0a507ac

Browse files
committed
Fix default for map element
1 parent af34b8a commit 0a507ac

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎rules/map/tgt_unsafe.rs‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ unsafe fn f1<T1: Ord + Clone, T2: Default>(
2626
) -> &mut T2 {
2727
&mut a0
2828
.entry(a1.clone())
29-
.or_insert_with(|| Box::new((a1, T2::default())))
29+
.or_insert_with(|| Box::new((a1, <T2>::default())))
3030
.1
3131
}
3232
unsafe fn f2<T1, T2>(a0: BTreeMap<T1, Box<(T1, T2)>>) -> usize {
@@ -56,7 +56,7 @@ unsafe fn f8<T1: Ord + Clone, T2: Default>(
5656
) -> &mut T2 {
5757
&mut a0
5858
.entry(a1.clone())
59-
.or_insert_with(|| Box::new((a1, T2::default())))
59+
.or_insert_with(|| Box::new((a1, <T2>::default())))
6060
.1
6161
}
6262
unsafe fn f9<T1: Ord + Clone, T2>(a0: BTreeMap<T1, Box<(T1, T2)>>) -> UnsafeMapIterator<T1, T2> {

0 commit comments

Comments
 (0)