-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Types with a hidden niche are not known to be non-null #79804
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
r? @varkor (rust-highfive has picked a reviewer for you, use r? to override) |
e6fbfd5
to
416ef64
Compare
improper_ctypes
lint
@rustbot modify labels: +S-waiting-on-review -S-waiting-on-author |
@@ -672,6 +672,10 @@ crate fn ty_is_known_nonnull<'tcx>(cx: &LateContext<'tcx>, ty: Ty<'tcx>, mode: C | |||
return true; | |||
} | |||
|
|||
if def.repr.hide_niche() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you add a comment here explaining why, for someone who may not already be aware when niches are hidden?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added a comment mentioning no_niche
and UnsafeCell
.
416ef64
to
8fc2462
Compare
Implementation looks fine, but I'm not familiar enough with the purpose of r? @pnkfelix |
sorry it took me so long to get to this. This seems right to me. |
@bors r+ |
📌 Commit 8fc2462 has been approved by |
@bors rollup=never - possibly perf sensitive |
☀️ Test successful - checks-actions |
Fixes #79787.