Skip to content

Commit 6b6e41d

Browse files
committed
allow nonnull projections when T: ?Sized
1 parent 19ac297 commit 6b6e41d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/projections/non_null.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ impl<T: ?Sized> Projectable for NonNull<T> {
77
// Additional safety requirements for `project`:
88
// * The pointer pointed at by `this` must point to an allocated object at least as large as
99
// `size_of::<T>()`.
10-
impl<T, F> Project<F> for NonNull<T>
10+
impl<T: ?Sized, F> Project<F> for NonNull<T>
1111
where
1212
F: UnalignedField<Base = T>,
1313
F::Type: Sized,
@@ -27,6 +27,6 @@ where
2727

2828
// Compat
2929

30-
unsafe impl<T> compat::ProjectableExt for NonNull<T> {
30+
unsafe impl<T: ?Sized> compat::ProjectableExt for NonNull<T> {
3131
type Safety = compat::Unsafe;
3232
}

0 commit comments

Comments
 (0)