Initial UnsafePinned/UnsafeUnpin impl [Part 1: Libs]

This commit is contained in:
Sky 2025-02-14 15:56:24 -05:00
parent ae06b79dcb
commit 21b7360a9a
No known key found for this signature in database
GPG key ID: 2755A6B7099BC040
11 changed files with 290 additions and 8 deletions

View file

@ -864,8 +864,8 @@ fn ty_is_known_nonnull<'tcx>(
return true;
}
// `UnsafeCell` has its niche hidden.
if def.is_unsafe_cell() {
// `UnsafeCell` and `UnsafePinned` have their niche hidden.
if def.is_unsafe_cell() || def.is_unsafe_pinned() {
return false;
}