-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Unsafe blocks make their contents pure? #1210
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
Comments
purity and unsafety are not orthogonal. At first I thought they ought to be but it made a lot of things harder and I couldn't think of a good reason to support it. So functions are either normal, pure, or unsafe. As a side effect, an unsafe block is like an unchecked block but stronger. I am not sure this is how it should be, but it's not an accident per se. |
Yes, I remember that decision now. Closing. |
* Add "fixme" testcase for rust-lang#1208 I also added an override for the `unreachable!()` macro to print nicer error message. * Document override + test
This came from a pull request recently:
I would expect that 'unsafe' block to be an 'unchecked' block.
The text was updated successfully, but these errors were encountered: