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

Document that isize/usize are at least 16-bit wide on all platforms we currently support #643

Closed
gnzlbg opened this issue Jul 25, 2019 · 4 comments · Fixed by #834
Closed
Labels
Easy We believe this would not be difficult to actually fix Enhancement Improvement in a non-prose section of the book

Comments

@gnzlbg
Copy link
Contributor

gnzlbg commented Jul 25, 2019

See this UCG PR: rust-lang/unsafe-code-guidelines#154

@briansmith raised the issue that this guarantee would be more useful if it was documented elsewhere and they are right. We should document that here, in the isize/usize API docs, and maybe also on the trait impls justified by this observation, like the From<u16> impl for usize, for example.

@Centril
Copy link
Contributor

Centril commented Jul 25, 2019

Sure, this seems reasonable to specify somewhere... but which section exactly... perhaps a new one "Assumptions about the platform"?

cc @ehuss

@Centril Centril added the Enhancement Improvement in a non-prose section of the book label Jul 25, 2019
@gnzlbg
Copy link
Contributor Author

gnzlbg commented Jul 25, 2019

Some trait impls are justified by this assumption, but we can't really attach documentation to trait impls AFAICT.

@Centril
Copy link
Contributor

Centril commented Jul 25, 2019

but we can't really attach documentation to trait impls AFAICT.

AFAIK we can actually.

@ehuss
Copy link
Contributor

ehuss commented Jul 25, 2019

@ehuss ehuss added the Easy We believe this would not be difficult to actually fix label Apr 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Easy We believe this would not be difficult to actually fix Enhancement Improvement in a non-prose section of the book
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants