Skip to content
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

About "How Safe and Unsafe Interact" #176

Closed
Tigerly opened this issue Dec 6, 2019 · 1 comment · Fixed by #294
Closed

About "How Safe and Unsafe Interact" #176

Tigerly opened this issue Dec 6, 2019 · 1 comment · Fixed by #294
Labels
C-confusing The description is confusing or not clear.

Comments

@Tigerly
Copy link

Tigerly commented Dec 6, 2019

Hello,

Very good document. I have a question, after reading "How Safe and Unsafe Interact" section, I am still confused about why "Safe Rust inherently has to trust that any Unsafe Rust it touches has been written correctly. On the other hand, Unsafe Rust has to be very careful about trusting Safe Rust."

Would it be possible to explain it a little bit more?

Thanks in advance!

@JohnTitor JohnTitor added the C-confusing The description is confusing or not clear. label Jul 27, 2021
@JohnTitor
Copy link
Member

Thanks for the report and sorry for the big delay! The paragraphs that follow explain its relationship in more detail. I guess you were confused about the latter sentence ("Unsafe Rust has to be very careful about trusting Safe Rust"), right? It means that Unsafe Rust cannot deal with any inputs from Safe Rust without care, as it may be wrong and can cause UB. Anyway, opened #294 to clarify that, I hope it eases your confusion :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-confusing The description is confusing or not clear.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants