@@ -549,7 +549,7 @@ impl<'a, K, V, Type> NodeRef<marker::Mut<'a>, K, V, Type> {
549
549
/// `into_root_mut`) mess with the root of the tree, the result of `reborrow_mut`
550
550
/// can easily be used to make the original mutable pointer dangling, or, in the case
551
551
/// of a reborrowed handle, out of bounds.
552
- // FIXME(@ gereeter) consider adding yet another type parameter to `NodeRef` that restricts
552
+ // FIXME(gereeter): consider adding yet another type parameter to `NodeRef` that restricts
553
553
// the use of `ascend` and `into_root_mut` on reborrowed pointers, preventing this unsafety.
554
554
unsafe fn reborrow_mut ( & mut self ) -> NodeRef < marker:: Mut < ' _ > , K , V , Type > {
555
555
NodeRef {
@@ -578,12 +578,12 @@ impl<'a, K, V, Type> NodeRef<marker::Mut<'a>, K, V, Type> {
578
578
impl < ' a , K : ' a , V : ' a , Type > NodeRef < marker:: Immut < ' a > , K , V , Type > {
579
579
fn into_key_slice ( self ) -> & ' a [ K ] {
580
580
// We have to be careful here because we might be pointing to the shared root.
581
- // In that case, we must not create an `&LeafNode`. We could just return
581
+ // In that case, we must not create an `&LeafNode`. We could just return
582
582
// an empty slice whenever the length is 0 (this includes the shared root),
583
583
// but we want to avoid that run-time check.
584
584
// Instead, we create a slice pointing into the node whenever possible.
585
585
// We can sometimes do this even for the shared root, as the slice will be
586
- // empty. We cannot *always* do this because if the type is too highly
586
+ // empty. We cannot *always* do this because if the type is too highly
587
587
// aligned, the offset of `keys` in a "full node" might be outside the bounds
588
588
// of the header! So we do an alignment check first, that will be
589
589
// evaluated at compile-time, and only do any run-time check in the rare case
@@ -594,9 +594,9 @@ impl<'a, K: 'a, V: 'a, Type> NodeRef<marker::Immut<'a>, K, V, Type> {
594
594
// Thanks to the alignment check above, we know that `keys` will be
595
595
// in-bounds of some allocation even if this is the shared root!
596
596
// (We might be one-past-the-end, but that is allowed by LLVM.)
597
- // Getting the pointer is tricky though. `NodeHeader` does not have a `keys`
597
+ // Getting the pointer is tricky though. `NodeHeader` does not have a `keys`
598
598
// field because we want its size to not depend on the alignment of `K`
599
- // (needed becuase `as_header` should be safe). We cannot call `as_leaf`
599
+ // (needed becuase `as_header` should be safe). We cannot call `as_leaf`
600
600
// because we might be the shared root.
601
601
// For this reason, `NodeHeader` has this `K2` parameter (that's usually `()`
602
602
// and hence just adds a size-0-align-1 field, not affecting layout).
@@ -950,7 +950,7 @@ impl<'a, K, V, NodeType, HandleType>
950
950
/// `into_root_mut`) mess with the root of the tree, the result of `reborrow_mut`
951
951
/// can easily be used to make the original mutable pointer dangling, or, in the case
952
952
/// of a reborrowed handle, out of bounds.
953
- // FIXME(@ gereeter) consider adding yet another type parameter to `NodeRef` that restricts
953
+ // FIXME(gereeter): consider adding yet another type parameter to `NodeRef` that restricts
954
954
// the use of `ascend` and `into_root_mut` on reborrowed pointers, preventing this unsafety.
955
955
pub unsafe fn reborrow_mut ( & mut self )
956
956
-> Handle < NodeRef < marker:: Mut < ' _ > , K , V , NodeType > , HandleType > {
0 commit comments