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

Deny unsafe operations in unsafe fns in libstd/sync/ #74278

Conversation

poliorcetics
Copy link
Contributor

Partial fix of #73904.

This encloses unsafe operations in unsafe fn in libstd/sync/.

@rustbot modify labels: F-unsafe-block-in-unsafe-fn

@rust-highfive
Copy link
Collaborator

r? @hanna-kruppe

(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 Jul 12, 2020
Copy link
Member

@Mark-Simulacrum Mark-Simulacrum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suspect that fixing these may not be worth it -- they look like they're all related to the mpsc module which is essentially abandoned at this point (and there's ongoing experiments in the ecosystem which are looking to replace it).

src/libstd/sync/mpsc/blocking.rs Outdated Show resolved Hide resolved
src/libstd/sync/mpsc/mod.rs Show resolved Hide resolved
src/libstd/sync/mpsc/spsc_queue.rs Outdated Show resolved Hide resolved
src/libstd/sync/mpsc/spsc_queue.rs Outdated Show resolved Hide resolved
@poliorcetics poliorcetics force-pushed the std-sync-unsafe-op-in-unsafe-fn branch from 92acbb2 to 8ec744d Compare July 13, 2020 21:00
@hanna-kruppe
Copy link
Contributor

r? @Mark-Simulacrum

@Mark-Simulacrum
Copy link
Member

@poliorcetics Would you be opposed to just closing this? This is currently not quite in the shape that I'd like it to be for merging it and I feel like it would be better to dedicate time elsewhere -- editing the mpsc code is pretty much not viable today due to lack of good reviewers, and so I'd rather not spend time hashing out good safety annotations.

@poliorcetics
Copy link
Contributor Author

No problems on my side, go ahead.

@LeSeulArtichaut
Copy link
Contributor

@Mark-Simulacrum I think we should have a PR adding just the unsafe blocks then? @polioretics would you mind filing a PR for that?

@Mark-Simulacrum
Copy link
Member

I don't think there's any point to doing so, we can just allow the lint for this module.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
F-unsafe-block-in-unsafe-fn RFC #2585 S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants