Skip to content

Make [deny(unsafe_op_in_unsafe_fn)] optional#1720

Draft
thedataking wants to merge 7 commits intomasterfrom
perl/unsafe_op_in_unsafe_fn
Draft

Make [deny(unsafe_op_in_unsafe_fn)] optional#1720
thedataking wants to merge 7 commits intomasterfrom
perl/unsafe_op_in_unsafe_fn

Conversation

@thedataking
Copy link
Copy Markdown
Contributor

We should not emit an extra unsafe block around most function bodies.
The c2rust output is less verbose and easier to consume by TRACTOR tools if we silence the lint instead.

@thedataking thedataking requested a review from ahomescu April 2, 2026 10:27
@Rua
Copy link
Copy Markdown
Contributor

Rua commented Apr 2, 2026

In the 2027 edition that's planned to become a hard error, probably no longer allowable. What happens then?

@thedataking
Copy link
Copy Markdown
Contributor Author

internal discussion:

  • makes sense to leave machinery to generate these unsafe blocks (not reverted)
  • turning off unsafe blocks for now
  • could add option to turn on (don't want to fully snapshot test resulting code with unsafe blocks)

@thedataking thedataking changed the title Stop emitting [deny(unsafe_op_in_unsafe_fn)] Make [deny(unsafe_op_in_unsafe_fn)] optional Apr 2, 2026
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