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

Tracking issue for core::ptr::dangling/_mut (feature ptr_dangling) #45557

Closed
bluss opened this issue Oct 26, 2017 · 6 comments
Closed

Tracking issue for core::ptr::dangling/_mut (feature ptr_dangling) #45557

bluss opened this issue Oct 26, 2017 · 6 comments
Labels
B-unstable Blocker: Implemented in the nightly compiler and unstable. C-tracking-issue Category: A tracking issue for an RFC or an unstable feature. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.

Comments

@bluss
Copy link
Member

bluss commented Oct 26, 2017

Tracking issue for core::ptr::dangling/_mut (feature ptr_dangling)

@kennytm kennytm added B-unstable Blocker: Implemented in the nightly compiler and unstable. C-tracking-issue Category: A tracking issue for an RFC or an unstable feature. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. labels Oct 26, 2017
@nagisa
Copy link
Member

nagisa commented Oct 30, 2017

One issue I can see with this function is that it might return pointers that actually point somewhere even on systems where the 0th page is considered to be always unmapped.

@petrochenkov
Copy link
Contributor

As I understand it the point of the function is to return something non-null and aligned, so it doesn't matter whether it's a valid pointer or not.
We can just specify that you are not allowed to dereference the pointer returned by ptr::dangling without guaranteeing anything about it validity (i.e. equality to other existing valid pointers).

@nagisa
Copy link
Member

nagisa commented Oct 31, 2017 via email

@nagisa
Copy link
Member

nagisa commented Oct 31, 2017 via email

@bluss
Copy link
Member Author

bluss commented Nov 1, 2017

If you want changes in the PR #45527, please write about them over there.

@SimonSapin
Copy link
Contributor

This feature never landed and the implementation PR is closed. Closing this as well, feel free to reopen as appropriate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
B-unstable Blocker: Implemented in the nightly compiler and unstable. C-tracking-issue Category: A tracking issue for an RFC or an unstable feature. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

5 participants