-
Notifications
You must be signed in to change notification settings - Fork 290
Possibly a typo on the "What Unsafe Rust Can Do" page? #299
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
So, if we consider "null pointers ⊂ dangling pointers", the latter sentence should be reworded as you suggested. |
I think it would be reasonable to say that the null pointer is dangling... or are you saying that is not standard terminology? I never thought much about this, TBH. |
No I don't think (TBH, I'm not sure) it's standard, but after some googling, I think some may want to distinguish "dangling pointers" from "null pointers" from the point of view of "whether it was valid, i.e. pointing to an actual place before". Anyway, if it's not confusing, I'm happy to reword the part as Denis suggested (dangling is the same as |
But then what about pointers like |
Hmm, I'm not sure, TBH. Anyway, I'm going just to reword it as mentioned above, I think it's the best way here. |
https://github.com/rust-lang/nomicon/blob/0c7e5bd1428e7838252bb57b7f0fbfda4ec82f02/src/what-unsafe-does.md
Here's a paragraph that caused my confusion:
So, the first sentence states:
And the sentence about an empty span states:
Isn't there a contradiction? Shouldn't it be more like "is the same as null" or "non-danling" in the latter sentence?
Or am I missing something?
Thanks!
The text was updated successfully, but these errors were encountered: