-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Add check if ty has_escaping_bound_vars in zero_sized_map_values lint #7470
Conversation
r? @flip1995 (rust-highfive has picked a reviewer for you, use r? to override) |
Not exactly sure if this is the best way, This also fails so |
I think this is a more general problem in Clippy. The same error with |
Let's ask about it: rust-lang/rust#86867 (comment) |
Cool in a day or so I can just preemptively add this to all the |
Yeah. Or better: implement a fn layout_of(cx: LateContext, ty: Ty) -> Option<_> {
if ty.has_escaping_bound_vars() {
return None;
}
cx.tcx.layout_of(ty)
} If you don't have time for it, let me know and I'll do this tomorrow. We have to sync back those fixes before the release in 1 and a half weeks. |
Since we didn't get any more reports on this, I'm holding off from replacing all of the @bors r+ |
📌 Commit 7312611 has been approved by |
☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test |
Cool thanks! Sorry I didn't get around to it I was doing a bit more traveling than I thought I'll keep an eye on any ICE that could be related. |
Update Clippy This is an out-of-cycle Clippy update, to fix 3 ICEs before the release (This should be merged before beta is branched): rust-lang/rust-clippy#7470 rust-lang/rust-clippy#7471 rust-lang/rust-clippy#7473 cc `@jackh726` `@JohnTitor` rust-lang/rust-clippy#7470 was caused by rust-lang#86867. I saw the same ICE in the last rustup for Clippy though, so this might be a more general problem. Is there something we should check before calling `layout_of`? Should we always check for `ty.has_escaping_bound_vars()` before calling `layout_of`? Or is this overkill? r? `@Manishearth`
Fixes: #7447
changelog: fix ICE in [
zero_sized_map_values
]