Skip to content

Commit 056d459

Browse files
separate safe/unsafe for challenge 17
1 parent d72e6cd commit 056d459

2 files changed

Lines changed: 18 additions & 16 deletions

File tree

doc/src/challenges/0017-slice.md

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,21 @@ Verify the safety of `std::slice` functions in (library/core/src/slice/mod.rs).
1818

1919
The safety of the following functions in (library/core/src/slice/mod.rs):
2020

21+
| Function |
22+
|---------|
23+
|get_unchecked|
24+
|get_unchecked_mut|
25+
|swap_unchecked|
26+
|as_chunks_unchecked|
27+
|as_chunks_unchecked_mut|
28+
|split_at_unchecked|
29+
|split_at_mut_unchecked|
30+
|align_to|
31+
|align_to_mut|
32+
|get_disjoint_unchecked_mut|
33+
34+
The safety of the following functions in (library/core/src/slice/mod.rs):
35+
2136
| Function |
2237
|---------|
2338
|first_chunk|
@@ -28,21 +43,10 @@ The safety of the following functions in (library/core/src/slice/mod.rs):
2843
|split_last_chunk_mut|
2944
|last_chunk|
3045
|last_chunk_mut|
31-
|get_unchecked|
32-
|get_unchecked_mut|
33-
|as_ptr_range|
34-
|as_mut_ptr_range|
35-
|as_array|
36-
|as_mut_array|
37-
|swap|
38-
|swap_unchecked|
3946
|reverse|
40-
|as_chunks_unchecked|
4147
|as_chunks|
48+
|as_chunks_mut|
4249
|as_rchunks|
43-
|as_chunks_unchecked_mut|
44-
|split_at_unchecked|
45-
|split_at_mut_unchecked|
4650
|split_at_checked|
4751
|split_at_mut_checked|
4852
|binary_search_by|
@@ -52,12 +56,10 @@ The safety of the following functions in (library/core/src/slice/mod.rs):
5256
|copy_from_slice|
5357
|copy_within|
5458
|swap_with_slice|
55-
|align_to|
56-
|align_to_mut|
5759
|as_simd|
5860
|as_simd_mut|
59-
|get_many_unchecked_mut|
60-
|get_many_mut|
61+
|get disjioin_mut|
62+
|get disjioin_check_valid|
6163
|as_flattened|
6264
|as_flattened_mut|
6365

0 commit comments

Comments
 (0)