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

refine detail about what "old behavior" of as is. #1045

Merged
merged 1 commit into from Apr 8, 2015

Conversation

pnkfelix
Copy link
Member

@pnkfelix pnkfelix commented Apr 8, 2015

refine detail about what "old behavior" of as is.

alexcrichton added a commit that referenced this pull request Apr 8, 2015
refine detail about what "old behavior" of `as` is.
@alexcrichton alexcrichton merged commit e1674e3 into rust-lang:master Apr 8, 2015
@alexcrichton
Copy link
Member

Looks good to me!

@bombless
Copy link

bombless commented Apr 9, 2015

Seems that this doesn't cover the case when integer is casted to float.

@bombless
Copy link

cc rust-lang/rust#10185

@pnkfelix
Copy link
Member Author

I think it was left implicit in the RFC text that when it spoke on the semantics of as, it was referring solely to the semantics of as with respect to int-type -> int-type conversions. It does not address using as to-or-from references, nor floats, nor unsafe pointers, etc.

I don't think this RFC text would be the right place to try to document the full semantics of as. The detail here was solely about int-type -> int-type casts, and that was just because the RFC as originally accepted had mandated that as would start dynamically checking the behavior of as, which was then rejected based on discussion here: http://internals.rust-lang.org/t/on-casts-and-checked-overflow/1710/

@Centril Centril added the not-rfc For PRs that fix things like spelling mistakes, wrong file names, etc. label Nov 23, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
not-rfc For PRs that fix things like spelling mistakes, wrong file names, etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants