-
Notifications
You must be signed in to change notification settings - Fork 13
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
Using unsafe in unsafe functions #335
Comments
매우 좋은 것 같습니다. 이런 기능이 있는지 몰랐는데 우리 목적으로는 지금 빨리 켜는게 좋을 것 같습니다. |
이걸 혹시 code base 전체에 적용할 수도 있을까요? Originally posted by @jeehoonkang in #334 (comment) 네. Originally posted by @Medowhill in #334 (comment) |
현재는
unsafe
함수 안에서unsafe
블록 없이unsafe
한 일들을 할 수 있지만 이는 바람직하지 않습니다. (https://github.com/rust-lang/rfcs/blob/master/text/2585-unsafe-block-in-unsafe-fn.md) 이는#[deny(unsafe_op_in_unsafe_fn)]
를 함수나 모듈 앞에 추가해 해결할 수 있습니다. (rust-lang/rust#72709)PR #334 에서 해당 기능을 사용할 수 있도록
lib.rs
에#![feature(unsafe_block_in_unsafe_fn)]
를 추가했고 PR에서 수정한 함수 하나가#[deny(unsafe_op_in_unsafe_fn)]
를 사용하고 있습니다. 현재 단계에서는 해당 기능이 당장 중요하지 않지만, 리팩토링이 마무리 단계에 들어가고 본격적으로unsafe
에 대한 논증을 하게 되면 해당 기능을 프로젝트 전체에서 사용하는 것을 고려해 보아야 할 거 같습니다.The text was updated successfully, but these errors were encountered: