File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -1588,6 +1588,9 @@ impl<A: Allocator + Clone> RawTableInner<A> {
1588
1588
/// Searches for an empty or deleted bucket which is suitable for inserting
1589
1589
/// a new element, returning the `index` for the new [`Bucket`].
1590
1590
///
1591
+ /// This function does not make any changes to the `data` part of the table, or any
1592
+ /// changes to the `items` or `growth_left` field of the table.
1593
+ ///
1591
1594
/// The table must have at least 1 empty or deleted `bucket`, otherwise this function
1592
1595
/// will never return (will go into an infinite loop) for tables larger than the group
1593
1596
/// width, or return an index outside of the table indices range if the table is less
@@ -1598,10 +1601,9 @@ impl<A: Allocator + Clone> RawTableInner<A> {
1598
1601
/// Actually, calling this function is always safe, but attempting to write data at
1599
1602
/// the index returned by this function when the table is less than the group width
1600
1603
/// and if there was not at least one empty bucket in the table will cause immediate
1601
- /// [`undefined behavior`].
1602
- ///
1603
- /// This is because in this case the function will return `self.bucket_mask + 1`
1604
- /// as an index due to the trailing EMPTY control bytes outside the table range.
1604
+ /// [`undefined behavior`]. This is because in this case the function will return
1605
+ /// `self.bucket_mask + 1` as an index due to the trailing EMPTY control bytes outside
1606
+ /// the table range.
1605
1607
///
1606
1608
/// [`undefined behavior`]: https://doc.rust-lang.org/reference/behavior-considered-undefined.html
1607
1609
#[ inline]
You can’t perform that action at this time.
0 commit comments