Skip to content

Commit 5465e6e

Browse files
authored
[ci] Roll pinned nightly toolchain (#975)
1 parent cac291e commit 5465e6e

File tree

2 files changed

+5
-13
lines changed

2 files changed

+5
-13
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ zerocopy-panic-in-const = "1.57.0"
4444
[package.metadata.ci]
4545
# The versions of the stable and nightly compiler toolchains to use in CI.
4646
pinned-stable = "1.76.0"
47-
pinned-nightly = "nightly-2024-02-26"
47+
pinned-nightly = "nightly-2024-02-28"
4848

4949
[package.metadata.docs.rs]
5050
all-features = true

src/pointer/ptr.rs

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -946,10 +946,7 @@ mod _casts {
946946
pub unsafe fn cast_unsized<U: 'a + ?Sized, F: FnOnce(*mut T) -> *mut U>(
947947
self,
948948
cast: F,
949-
) -> Ptr<'a, U, (I::Aliasing, invariant::Any, invariant::Any)>
950-
where
951-
U: 'a,
952-
{
949+
) -> Ptr<'a, U, (I::Aliasing, invariant::Any, invariant::Any)> {
953950
let ptr = cast(self.as_non_null().as_ptr());
954951

955952
// SAFETY: Caller promises that `cast` is just a cast. We call
@@ -1114,12 +1111,10 @@ mod _casts {
11141111
/// # Panics
11151112
///
11161113
/// Panics if `U` is a DST whose trailing slice element is zero-sized.
1117-
pub(crate) fn try_cast_into<U: 'a + ?Sized + KnownLayout>(
1114+
pub(crate) fn try_cast_into<U: 'a + ?Sized + KnownLayout + NoCell>(
11181115
&self,
11191116
cast_type: CastType,
11201117
) -> Option<(Ptr<'a, U, (I::Aliasing, invariant::Aligned, invariant::Initialized)>, usize)>
1121-
where
1122-
U: NoCell,
11231118
{
11241119
// PANICS: By invariant, the byte range addressed by `self.ptr` does
11251120
// not wrap around the address space. This implies that the sum of
@@ -1215,12 +1210,9 @@ mod _casts {
12151210
/// references the same byte range as `self`.
12161211
#[allow(unused)]
12171212
#[inline(always)]
1218-
pub(crate) fn try_cast_into_no_leftover<U: 'a + ?Sized + KnownLayout>(
1213+
pub(crate) fn try_cast_into_no_leftover<U: 'a + ?Sized + KnownLayout + NoCell>(
12191214
&self,
1220-
) -> Option<Ptr<'a, U, (I::Aliasing, invariant::Aligned, invariant::Initialized)>>
1221-
where
1222-
U: NoCell,
1223-
{
1215+
) -> Option<Ptr<'a, U, (I::Aliasing, invariant::Aligned, invariant::Initialized)>> {
12241216
// TODO(#67): Remove this allow. See NonNulSlicelExt for more
12251217
// details.
12261218
#[allow(unstable_name_collisions)]

0 commit comments

Comments
 (0)