Skip to content

cleanup: Reuse MinInt and Int from libm in compiler-builtins #879

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

Merged
merged 1 commit into from
May 29, 2025

Conversation

tgross35
Copy link
Contributor

@tgross35 tgross35 commented Apr 21, 2025

Since the two crates are now in the same repo, it is easier to share
code. Begin some deduplication with the integer traits.

@tgross35 tgross35 changed the title cleanup: Reuse MinInt and Int from libm in compiler-builtins cleanup: Reuse MinInt and Int from libm in compiler-builtins Apr 21, 2025
CONTRIBUTING.md Outdated
- To reinterpret an integer as a float use the `f32::from_bits` constructor. The
MUSL code uses the `SET_FLOAT_WORD` macro, or a union, to do this operation.
- You may use other methods from core like `f64::is_nan`, etc. as appropriate.
- Rust does not have hex float literals. This crate provides two `hf16!`,
Copy link

Choose a reason for hiding this comment

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

Suggested change
- Rust does not have hex float literals. This crate provides two `hf16!`,
- Rust does not have hex float literals. This crate provides four `hf16!`,

or just drop the word

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm not exactly sure why this diff was part of my original PR here, but I think it doesn't apply anymore. Please feel free to send a fix for CONTRIBUTING.md though, a second set of eyes would certainly be welcome :)

Since the two crates are now in the same repo, it is easier to share
code. Begin some deduplication with the integer traits.
@tgross35 tgross35 merged commit 0608b45 into rust-lang:master May 29, 2025
35 checks passed
@tgross35 tgross35 deleted the trait-cleanup branch May 29, 2025 03:52
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.

2 participants