about summary refs log tree commit diff
path: root/compiler/rustc_lint/src
diff options
context:
space:
mode:
authorOli Scherer <git-spam-no-reply9815368754983@oli-obk.de>2022-07-07 10:46:22 +0000
committerOli Scherer <git-spam-no-reply9815368754983@oli-obk.de>2022-07-07 10:46:22 +0000
commit2a899dc1cfe37270cf976b54a2953133faafa0ae (patch)
tree25a59ae0560ff4d4d2490f4985e9424051fb871a /compiler/rustc_lint/src
parente78e747f53c36e53ff99c94438d2efa26830fc4b (diff)
downloadrust-2a899dc1cfe37270cf976b54a2953133faafa0ae.tar.gz
rust-2a899dc1cfe37270cf976b54a2953133faafa0ae.zip
`UnsafeCell` now has no niches, ever.
Diffstat (limited to 'compiler/rustc_lint/src')
-rw-r--r--compiler/rustc_lint/src/types.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_lint/src/types.rs b/compiler/rustc_lint/src/types.rs
index be4843c7ff1..4ed9d9b27b2 100644
--- a/compiler/rustc_lint/src/types.rs
+++ b/compiler/rustc_lint/src/types.rs
@@ -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;
             }