Skip to content
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

"Respect" enums in interior_mutable_const #6110

Merged
merged 2 commits into from
Nov 7, 2020

Conversation

rail-rain
Copy link
Contributor

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 linted
even if it uses a clearly unfrozen variant

@rust-highfive
Copy link

r? @phansch

(rust_highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Oct 4, 2020
* 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).
@phansch
Copy link
Member

phansch commented Oct 12, 2020

Thanks for the PR! I hope to have an initial review out by the end of this week.

@giraffate
Copy link
Contributor

Ping from triage @phansch. Could you reassign this? (I'm sorry to mention you. I know you are taking time for a break.)

@phansch
Copy link
Member

phansch commented Nov 4, 2020

r? @llogiq

@rust-highfive rust-highfive assigned llogiq and unassigned phansch Nov 4, 2020
@llogiq
Copy link
Contributor

llogiq commented Nov 7, 2020

The implementation seems good to me. I'm unsure about the unfrozen stuff, too, but let's not block on that right now.

Thank you for the PR! @bors r+

@bors
Copy link
Contributor

bors commented Nov 7, 2020

📌 Commit f58a169 has been approved by llogiq

@bors
Copy link
Contributor

bors commented Nov 7, 2020

⌛ Testing commit f58a169 with merge 694cec1...

@bors
Copy link
Contributor

bors commented Nov 7, 2020

☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test
Approved by: llogiq
Pushing 694cec1 to master...

@bors bors merged commit 694cec1 into rust-lang:master Nov 7, 2020
@rail-rain rail-rain deleted the care_enums_non_copy_const branch November 8, 2020 21:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties
Projects
None yet
6 participants