-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Remove From
impls for unstable types that break inference
#123830
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
r? @Nilstrieb rustbot has assigned @Nilstrieb. Use |
rustbot
added
S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
T-libs
Relevant to the library team, which will review and decide on the PR/issue.
labels
Apr 11, 2024
Adding additional `From` implementations that fit `f32::from(<unaffixed float>)` broke inference. Remove these for now. Fixes: <rust-lang#123824>
tgross35
force-pushed
the
f16-f128-from-inference-fix
branch
from
April 11, 2024 22:04
f48cd1c
to
9bcc988
Compare
This only changes unstable API so I think it ok for somebody from libs (rather than libs-api) to review. @rustbot label +F-f16_and_f128 |
@bors r+ rollup |
bors
added
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
and removed
S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
labels
Apr 12, 2024
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Apr 12, 2024
…iaskrgr Rollup of 3 pull requests Successful merges: - rust-lang#123796 (Remove unused cargo-platform dependency from tidy) - rust-lang#123830 (Remove `From` impls for unstable types that break inference) - rust-lang#123842 (fix typo in pin.rs) r? `@ghost` `@rustbot` modify labels: rollup
rust-timer
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Apr 12, 2024
Rollup merge of rust-lang#123830 - tgross35:f16-f128-from-inference-fix, r=Nilstrieb Remove `From` impls for unstable types that break inference Adding additional `From` implementations that fit `f32::from(<unaffixed float>)` broke inference. Remove these for now. I added a test to make sure this doesn't quietly change in the future, even though the behavior is not technically guaranteed rust-lang#123824 (comment) Fixes: <rust-lang#123824>
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
May 5, 2024
Re-add `From<f16> for f64` This impl was originally added in rust-lang#122470 before being removed in rust-lang#123830 due to rust-lang#123831. However, the issue only affects `f32` (which currently only has one `From<{float}>` impl, `From<f32>`) as `f64` already has two `From<{float}>` impls (`From<f32>` and `From<f64>`) and is also the float literal fallback type anyway. Therefore it is safe to re-add `From<f16> for f64`. This PR also updates the FIXME link to point to the open issue rust-lang#123831 rather than the closed issue rust-lang#123824. Tracking issue: rust-lang#116909 `@rustbot` label +F-f16_and_f128 +T-libs-api
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
May 16, 2024
Re-add `From<f16> for f64` This impl was originally added in rust-lang#122470 before being removed in rust-lang#123830 due to rust-lang#123831. However, the issue only affects `f32` (which currently only has one `From<{float}>` impl, `From<f32>`) as `f64` already has two `From<{float}>` impls (`From<f32>` and `From<f64>`) and is also the float literal fallback type anyway. Therefore it is safe to re-add `From<f16> for f64`. This PR also updates the FIXME link to point to the open issue rust-lang#123831 rather than the closed issue rust-lang#123824. Tracking issue: rust-lang#116909 `@rustbot` label +F-f16_and_f128 +T-libs-api
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
F-f16_and_f128
`#![feature(f16)]`, `#![feature(f128)]`
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
T-libs
Relevant to the library team, which will review and decide on the PR/issue.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Adding additional
From
implementations that fitf32::from(<unaffixed float>)
broke inference. Remove these for now.I added a test to make sure this doesn't quietly change in the future, even though the behavior is not technically guaranteed #123824 (comment)
Fixes: #123824