Lint on black_box
ing ZSTs
#137658
Labels
A-lints
Area: Lints (warnings about flaws in source code) such as unused_mut.
A-zst
Area: Zero-sized types (ZST).
C-enhancement
Category: An issue proposing an enhancement or a PR with one.
E-medium
Call for participation: Medium difficulty. Experience needed to fix: Intermediate.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
If a function pointer is black boxed, the call is treated as opaque:
However, black boxing a ZST that implements
Fn
does nothing:This difference is subtle and we should lint on it. Suggested by @beetrees.
For reference: https://rust.godbolt.org/z/nvoEcnxKh
The text was updated successfully, but these errors were encountered: