IssueRaiser

Tracking Issue for "unsafe blocks in unsafe fn" (RFC #2585)

<!-- homu-ignore:start --> *[View all comments](https://triagebot.infra.rust-lang.org/gh-comments/rust-lang/rust/issues/71668)* <!-- homu-ignore:end --> This is a tracking issue for the RFC "unsafe blocks in unsafe fn" (rust-lang/rfcs#2585). The lint `unsafe_block_in_unsafe_fn` is stable, but the RFC proposes some further things we might want to do. ### About tracking issues Tracking issues are used to record the overall progress of implementation. They are also uses as hubs connecting to other relevant issues, e.g., bugs or open design questions. A tracking issue is however *not* meant for large scale discussion, questions, or bug reports about a feature. Instead, open a dedicated issue for the specific matter and add the relevant feature gate label. ### Steps - [x] Introduce an opt-in lint that, when enabled, causes unsafe blocks in unsafe functions to be considered required, and warns if they are absent when an unsafe operation is performed. - [x] Stabilization PR in Rust 1.52.0 (#79208) - [x] Include a suggestion with the lint that can insert required unsafe blocks. This could be as simple as adding a block across the entire function, though more granular insertion is probably better. (#112017) - [ ] Adjust documentation to describe the (somewhat unusual) effect of the lint, and to describe the possibility that the lint will be enabled default ([see instructions on rustc-dev-guide][doc-guide]) - [ ] Write a blog post describing the change, perhaps? [stabilization-gu

Posted by nikomatsakis on Apr 29, 2020, 1:02 PM

Tags

Related issues

Raise real-world problems, find people facing the same issue, and discuss solutions.3,500 issues0 comments

github (Sysadmin)

Tracking Issue for "unsafe blocks in unsafe fn" (RFC #2585)

nikomatsakisApr 29, 2020, 1:02 PM

<!-- homu-ignore:start --> *[View all comments](https://triagebot.infra.rust-lang.org/gh-comments/rust-lang/rust/issues/71668)* <!-- homu-ignore:end --> This is a tracking issue for the RFC "unsafe blocks in unsafe fn" (rust-lang/rfcs#2585). The lint `unsafe_block_in_unsafe_fn` is stable, but the RFC proposes some further things we might want to do. ### About tracking issues Tracking issues are used to record the overall progress of implementation. They are also uses as hubs connecting to other relevant issues, e.g., bugs or open design questions. A tracking issue is however *not* meant for large scale discussion, questions, or bug reports about a feature. Instead, open a dedicated issue for the specific matter and add the relevant feature gate label. ### Steps - [x] Introduce an opt-in lint that, when enabled, causes unsafe blocks in unsafe functions to be considered required, and warns if they are absent when an unsafe operation is performed. - [x] Stabilization PR in Rust 1.52.0 (#79208) - [x] Include a suggestion with the lint that can insert required unsafe blocks. This could be as simple as adding a block across the entire function, though more granular insertion is probably better. (#112017) - [ ] Adjust documentation to describe the (somewhat unusual) effect of the lint, and to describe the possibility that the lint will be enabled default ([see instructions on rustc-dev-guide][doc-guide]) - [ ] Write a blog post describing the change, perhaps? [stabilization-gu

Comments (0)

No comments yet. Start the discussion.

Comment on this issue