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

CStr::from_ptr should be documented to not allow strings bigger than isize::MAX #63590

Closed
KamilaBorowska opened this issue Aug 15, 2019 · 1 comment
Labels
A-docs Area: documentation for any part of the project, including the compiler, standard library, and tools A-FFI Area: Foreign function interface (FFI) C-enhancement Category: An issue proposing an enhancement or a PR with one.

Comments

@KamilaBorowska
Copy link
Contributor

KamilaBorowska commented Aug 15, 2019

In #53784, slice::from_raw_parts was documented to not allow slices larger than isize::MAX bytes. However, CStr::from_ptr is not documented to have the same requirement, despite allowing the user to obtain a slice larger than isize::MAX bytes with its to_bytes method.

@jonas-schievink jonas-schievink added A-FFI Area: Foreign function interface (FFI) A-docs Area: documentation for any part of the project, including the compiler, standard library, and tools C-enhancement Category: An issue proposing an enhancement or a PR with one. labels Aug 15, 2019
Centril added a commit to Centril/rust that referenced this issue Sep 11, 2019
Fixed documentation within c_str::from_ptr

Fixed the documentation issue mentioned in rust-lang#63590
@elichai
Copy link
Contributor

elichai commented Nov 11, 2019

I think this issue can be closed Now that #64326 is merged :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-docs Area: documentation for any part of the project, including the compiler, standard library, and tools A-FFI Area: Foreign function interface (FFI) C-enhancement Category: An issue proposing an enhancement or a PR with one.
Projects
None yet
Development

No branches or pull requests

3 participants