Skip to content

Commit

Permalink
[ci] Roll pinned nightly toolchain (#975)
Browse files Browse the repository at this point in the history
  • Loading branch information
joshlf committed Feb 29, 2024
1 parent cac291e commit 5465e6e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 13 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ zerocopy-panic-in-const = "1.57.0"
[package.metadata.ci]
# The versions of the stable and nightly compiler toolchains to use in CI.
pinned-stable = "1.76.0"
pinned-nightly = "nightly-2024-02-26"
pinned-nightly = "nightly-2024-02-28"

[package.metadata.docs.rs]
all-features = true
Expand Down
16 changes: 4 additions & 12 deletions src/pointer/ptr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -946,10 +946,7 @@ mod _casts {
pub unsafe fn cast_unsized<U: 'a + ?Sized, F: FnOnce(*mut T) -> *mut U>(
self,
cast: F,
) -> Ptr<'a, U, (I::Aliasing, invariant::Any, invariant::Any)>
where
U: 'a,
{
) -> Ptr<'a, U, (I::Aliasing, invariant::Any, invariant::Any)> {
let ptr = cast(self.as_non_null().as_ptr());

// SAFETY: Caller promises that `cast` is just a cast. We call
Expand Down Expand Up @@ -1114,12 +1111,10 @@ mod _casts {
/// # Panics
///
/// Panics if `U` is a DST whose trailing slice element is zero-sized.
pub(crate) fn try_cast_into<U: 'a + ?Sized + KnownLayout>(
pub(crate) fn try_cast_into<U: 'a + ?Sized + KnownLayout + NoCell>(
&self,
cast_type: CastType,
) -> Option<(Ptr<'a, U, (I::Aliasing, invariant::Aligned, invariant::Initialized)>, usize)>
where
U: NoCell,
{
// PANICS: By invariant, the byte range addressed by `self.ptr` does
// not wrap around the address space. This implies that the sum of
Expand Down Expand Up @@ -1215,12 +1210,9 @@ mod _casts {
/// references the same byte range as `self`.
#[allow(unused)]
#[inline(always)]
pub(crate) fn try_cast_into_no_leftover<U: 'a + ?Sized + KnownLayout>(
pub(crate) fn try_cast_into_no_leftover<U: 'a + ?Sized + KnownLayout + NoCell>(
&self,
) -> Option<Ptr<'a, U, (I::Aliasing, invariant::Aligned, invariant::Initialized)>>
where
U: NoCell,
{
) -> Option<Ptr<'a, U, (I::Aliasing, invariant::Aligned, invariant::Initialized)>> {
// TODO(#67): Remove this allow. See NonNulSlicelExt for more
// details.
#[allow(unstable_name_collisions)]
Expand Down

0 comments on commit 5465e6e

Please sign in to comment.