-
Notifications
You must be signed in to change notification settings - Fork 1.6k
"Respect" enums in interior_mutable_const
#6110
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Conversation
r? @phansch (rust_highfive has picked a reviewer for you, use r? to override) |
* remove a 'ERROR' comment from `borrow` `Vec<AtomicUsize>` itself is `Freeze` as it holds the atomic in heap * remove `ONCE_INIT` from `declare` it seems like an artifact from previous spliting
fix a false positive in two `interior_mutable_const` lints where a constant with enums gets linted even if it uses a clearly unfrozen variant. Note that the code uses the MIR interpreter, which the author of rust-lang#3962 thought unlikely to be a solution. This might be over-engineering; but, I think it's important to be able to work with the 'http' crate (rust-lang#3825).
e1b32ee
to
f58a169
Compare
Thanks for the PR! I hope to have an initial review out by the end of this week. |
Ping from triage @phansch. Could you reassign this? (I'm sorry to mention you. I know you are taking time for a break.) |
r? @llogiq |
The implementation seems good to me. I'm unsure about the Thank you for the PR! @bors r+ |
📌 Commit f58a169 has been approved by |
☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test |
fixes #3962
fixes #3825
Hello,
It might not be a good idea to submit another relatively large PR while I have an opened PR; but, I've finished this anyway. This may be able to wait for months.
Note: the code uses the MIR interpreter, which the author of #3962 thought unlikely to be a solution. This might be over-engineering; but, I think it's important to be able to work with the 'http' crate (#3825). (And, I don't want to write a MIR visitor)
changelog: fix a false positive in two
interior_mutable_const
lints where a constant with enums gets lintedeven if it uses a clearly unfrozen variant