Skip to content

Commit 1c7075b

Browse files
authored
Use Box<[T]> in refcount unique_ptr<T[]> rules (#603)
1 parent de0805c commit 1c7075b

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

‎rules/unique_ptr/tgt_refcount.rs‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ fn f3<T1>(a0: Ptr<T1>) -> Option<Value<T1>> {
3535
a0.to_owned_opt()
3636
}
3737

38-
fn f4<T1>(a0: Ptr<T1>) -> Option<Value<T1>> {
38+
fn f4<T1>(a0: Ptr<T1>) -> Option<Value<Box<[T1]>>> {
3939
a0.to_owned_opt()
4040
}
4141

@@ -48,7 +48,7 @@ fn f6<T1: ByteRepr>(a0: Ptr<Option<Value<Box<[T1]>>>>, a1: Ptr<T1>) {
4848
a0.write(a1.to_owned_opt())
4949
}
5050

51-
fn f7<T1>(a0: Value<T1>) -> Ptr<T1> {
51+
fn f7<T1>(a0: Option<Value<Box<[T1]>>>) -> Ptr<T1> {
5252
a0.as_pointer()
5353
}
5454

@@ -96,7 +96,7 @@ fn f18<T1>(a0: Option<Value<T1>>) -> Ptr<T1> {
9696
a0.as_pointer()
9797
}
9898

99-
fn f19<T1>(a0: Value<T1>, a1: usize) -> Ptr<T1> {
99+
fn f19<T1>(a0: Option<Value<Box<[T1]>>>, a1: usize) -> Ptr<T1> {
100100
(a0.as_pointer() as Ptr<T1>).offset(a1 as isize)
101101
}
102102

0 commit comments

Comments
 (0)