Skip to content

Commit

Permalink
awd
Browse files Browse the repository at this point in the history
  • Loading branch information
BoxyUwU committed Apr 18, 2022
1 parent 9428588 commit 0b6c4cd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions crates/bevy_ecs/src/ptr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ pub struct PtrMut<'a>(NonNull<u8>, PhantomData<&'a mut u8>);
/// the memory pointed to by this pointer as it may be pointing to an element in a `Vec` or
/// to a local in a function etc.
///
/// This type tries to act "borrow" like which means that:
/// - Pointer should be considered exclusive and so should not be cloned as this would lead
/// This type tries to act "borrow-like" like which means that:
/// - Pointer should be considered exclusive and mutable. It cannot be cloned as this would lead
/// to aliased mutability and potentially use after free bugs.
/// - Pointer always points to a valid value of whatever the pointee type is.
/// - It must always points to a valid value of whatever the pointee type is.
/// - The lifetime `'a` accurately represents how long the pointer is valid for.
///
/// It may be helpful to think of this type as similar to `&'a mut ManuallyDrop<dyn Any>` but
Expand Down

0 comments on commit 0b6c4cd

Please sign in to comment.