-
Notifications
You must be signed in to change notification settings - Fork 76
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Relax NoCell
bound of TryFromBytes::try_from_mut
#1017
Conversation
c20a0ef
to
c8d6674
Compare
dac2194
to
5c9afdf
Compare
c8d6674
to
f848f26
Compare
src/pointer/ptr.rs
Outdated
/// | ||
/// `Ptr` requires that: | ||
/// | ||
/// > During the lifetime 'a, no live reference or live `Ptr` will exist to this |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/// > During the lifetime 'a, no live reference or live `Ptr` will exist to this | |
/// > During the lifetime `'a`, no live reference or live `Ptr` will exist to this |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done (this particular doc comment no longer exists).
src/pointer/ptr.rs
Outdated
/// > memory which treats `UnsafeCell`s as existing at different ranges than | ||
/// > they exist in `T`. | ||
/// | ||
/// Implementations of this trait must prove that for an aliasing `A`, a cast of |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/// Implementations of this trait must prove that for an aliasing `A`, a cast of | |
/// Implementations of this trait must prove that, for an aliasing `A`, a cast of |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done (this particular doc comment no longer exists).
src/pointer/ptr.rs
Outdated
/// | ||
/// Implementations of this trait must prove that for an aliasing `A`, a cast of | ||
/// `Ptr<T, Aliasing = A>` to `Ptr<U, Aliasing = A>` does not introduce a live | ||
/// reference to `U` with `UnsafeCell`s at different ranges than a live |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/// reference to `U` with `UnsafeCell`s at different ranges than a live | |
/// reference or `Ptr` to `U` with `UnsafeCell`s at different ranges than a live |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done (this particular doc comment no longer exists).
src/pointer/ptr.rs
Outdated
/// Implementations of this trait must prove that for an aliasing `A`, a cast of | ||
/// `Ptr<T, Aliasing = A>` to `Ptr<U, Aliasing = A>` does not introduce a live | ||
/// reference to `U` with `UnsafeCell`s at different ranges than a live | ||
/// reference to `T`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/// reference to `T`. | |
/// reference or `Ptr` to `T`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done (this particular doc comment no longer exists).
src/pointer/ptr.rs
Outdated
pub(crate) fn try_cast_into<U: 'a + ?Sized + KnownLayout>( | ||
&self, | ||
cast_type: CastType, | ||
) -> Option<(Ptr<'a, U, (I::Aliasing, invariant::Aligned, invariant::Initialized)>, usize)> | ||
where | ||
[u8]: NoCellSafe<U, I::Aliasing>, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Presumably the changed bounds mean we also need to update the internal safety comments in this method body?
f848f26
to
46674af
Compare
Makes progress towards #5. Closes #1014. Co-authored-by: Joshua Liebow-Feeser <[email protected]>
46674af
to
1421250
Compare
Makes progress towards #5.
Closes #1014.