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

Specify behavior of int->float and f64->f32 casts #607

Merged
merged 2 commits into from
Sep 8, 2019
Merged

Specify behavior of int->float and f64->f32 casts #607

merged 2 commits into from
Sep 8, 2019

Conversation

hanna-kruppe
Copy link

@hanna-kruppe hanna-kruppe commented May 11, 2019

This documents the semantics proposed in rust-lang/rust#62231

Closes #570

@Havvy
Copy link
Contributor

Havvy commented May 11, 2019

If we actually guarantee it, the guarantee should be approved by the lang team first.

@gnzlbg
Copy link
Contributor

gnzlbg commented May 15, 2019

We can't ping the lang team here because this repo is part of the nursery and not of the rust-lang org. cc @Centril

@Centril
Copy link
Contributor

Centril commented May 15, 2019

An issue should be made on rust-lang/rust, tagged with t-lang + description of what guarantee is sought, and then we can consider that.

@hanna-kruppe
Copy link
Author

Finally got around to doing that: rust-lang/rust#62231

@hanna-kruppe
Copy link
Author

Updated with explicit mention of overflow behavior, better formatting, and the note about performance requested by @joshtriplett.

Copy link
Contributor

@Centril Centril left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good; just have a small nit.

src/expressions/operator-expr.md Show resolved Hide resolved
@hanna-kruppe
Copy link
Author

(Force-pushed just to edit the commit message: accidentally self-referenced this PR instead of pointing at rust-lang/rust#62231)

src/expressions/operator-expr.md Outdated Show resolved Hide resolved
@joshtriplett
Copy link
Member

One minor typo; other than that, this looks ready to go.

@hanna-kruppe hanna-kruppe changed the title Update description of float casts Specify behavior of int->float and f64->f32 casts Aug 16, 2019
@Centril
Copy link
Contributor

Centril commented Sep 8, 2019

FCP completed in rust-lang/rust#62231 (comment).

@Centril Centril merged commit dce794c into rust-lang:master Sep 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update undefined behavior note about float-to-float cast.
6 participants