Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Enable unsafe_op_in_unsafe_fn and missing_unsafe_on_extern lints #5557

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

Merged
merged 3 commits into from
Feb 25, 2025

Conversation

coolreader18
Copy link
Member

These will be enabled by default in rust2024, and they make more clear what is actually unsafe. I didn't add safety comments for the new unsafe blocks required by unsafe_op_in_unsafe_fn (except where obvious that requirements are simply forwarded from the caller), but we have plenty of unsafe blocks with no safety comments anyway. As I was adding the new unsafe blocks, I noticed it would make more sense and make the new code clearer if PyObjectRef::{from,into}_raw() took/returned NonNull instead of raw pointers, so I made that change in its own commit.

@coolreader18 coolreader18 force-pushed the unsafe_op_in_unsafe_fn branch from f02719a to de88525 Compare February 25, 2025 03:19
@coolreader18 coolreader18 force-pushed the unsafe_op_in_unsafe_fn branch from de88525 to 92e02a7 Compare February 25, 2025 03:25
Copy link
Member

@youknowone youknowone left a comment

Choose a reason for hiding this comment

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

👍

@youknowone youknowone merged commit ff9947f into RustPython:main Feb 25, 2025
11 checks passed
@coolreader18 coolreader18 deleted the unsafe_op_in_unsafe_fn branch February 25, 2025 04:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.