Skip to content

Commit c523076

Browse files
committed
Add dyn to trait objects
1 parent 44915cd commit c523076

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/libstd/sys_common/parking_lot_core/parking_lot.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -558,9 +558,9 @@ where
558558
// Non-generic version to reduce monomorphization cost
559559
unsafe fn park_internal(
560560
key: usize,
561-
validate: &mut FnMut() -> bool,
562-
before_sleep: &mut FnMut(),
563-
timed_out: &mut FnMut(usize, bool),
561+
validate: &mut dyn FnMut() -> bool,
562+
before_sleep: &mut dyn FnMut(),
563+
timed_out: &mut dyn FnMut(usize, bool),
564564
park_token: ParkToken,
565565
timeout: Option<Instant>,
566566
) -> ParkResult {
@@ -698,7 +698,7 @@ where
698698
// Non-generic version to reduce monomorphization cost
699699
unsafe fn unpark_one_internal(
700700
key: usize,
701-
callback: &mut FnMut(UnparkResult) -> UnparkToken,
701+
callback: &mut dyn FnMut(UnparkResult) -> UnparkToken,
702702
) -> UnparkResult {
703703
// Lock the bucket for the given key
704704
let bucket = lock_bucket(key);
@@ -811,8 +811,8 @@ where
811811
unsafe fn unpark_requeue_internal(
812812
key_from: usize,
813813
key_to: usize,
814-
validate: &mut FnMut() -> RequeueOp,
815-
callback: &mut FnMut(RequeueOp, UnparkResult) -> UnparkToken,
814+
validate: &mut dyn FnMut() -> RequeueOp,
815+
callback: &mut dyn FnMut(RequeueOp, UnparkResult) -> UnparkToken,
816816
) -> UnparkResult {
817817
// Lock the two buckets for the given key
818818
let (bucket_from, bucket_to) = lock_bucket_pair(key_from, key_to);
@@ -949,8 +949,8 @@ where
949949
// Non-generic version to reduce monomorphization cost
950950
unsafe fn unpark_filter_internal(
951951
key: usize,
952-
filter: &mut FnMut(ParkToken) -> FilterOp,
953-
callback: &mut FnMut(UnparkResult) -> UnparkToken,
952+
filter: &mut dyn FnMut(ParkToken) -> FilterOp,
953+
callback: &mut dyn FnMut(UnparkResult) -> UnparkToken,
954954
) -> UnparkResult {
955955
// Lock the bucket for the given key
956956
let bucket = lock_bucket(key);

0 commit comments

Comments
 (0)