1
Fork 0

UnsafeCell now has no niches, ever.

This commit is contained in:
Oli Scherer 2022-07-07 10:46:22 +00:00
parent e78e747f53
commit 2a899dc1cf
22 changed files with 73 additions and 512 deletions

View file

@ -705,7 +705,7 @@ fn ty_is_known_nonnull<'tcx>(cx: &LateContext<'tcx>, ty: Ty<'tcx>, mode: CItemKi
// Types with a `#[repr(no_niche)]` attribute have their niche hidden.
// The attribute is used by the UnsafeCell for example (the only use so far).
if def.repr().hide_niche() {
if def.is_unsafe_cell() {
return false;
}