Fix is_val_statically_known for floats#129173
Merged
bors merged 1 commit intorust-lang:masterfrom Aug 18, 2024
Merged
Conversation
Collaborator
| | TypeKind::Float | ||
| | TypeKind::Double | ||
| | TypeKind::FP128 => { | ||
| let type_str = match kind { |
Contributor
There was a problem hiding this comment.
This double match is really awkward. I'd honestly rather the code duplication, or maybe make the _ => branch into a return so you can uplift that let type_str out of the outer match. Also worth leaving a note why some of these are special cased.
Contributor
Author
There was a problem hiding this comment.
I've refactored it to be a single match statement.
1e56969 to
9bc7cea
Compare
compiler-errors
approved these changes
Aug 17, 2024
Contributor
|
@bors r+ |
Contributor
Author
Contributor
|
I'll try closing and reopening |
Contributor
|
@bors r+ |
Collaborator
tgross35
added a commit
to tgross35/rust
that referenced
this pull request
Aug 17, 2024
…=compiler-errors Fix `is_val_statically_known` for floats The LLVM intrinsic name for floats differs from the LLVM type name, so handle them explicitly. Also adds support for `f16` and `f128`. `f16`/`f128` tracking issue: rust-lang#116909
tgross35
added a commit
to tgross35/rust
that referenced
this pull request
Aug 17, 2024
…=compiler-errors Fix `is_val_statically_known` for floats The LLVM intrinsic name for floats differs from the LLVM type name, so handle them explicitly. Also adds support for `f16` and `f128`. `f16`/`f128` tracking issue: rust-lang#116909
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Aug 17, 2024
Rollup of 9 pull requests Successful merges: - rust-lang#128786 (Detect multiple crate versions on method not found) - rust-lang#128982 (Re-enable more debuginfo tests on Windows) - rust-lang#128989 (Emit an error for invalid use of the linkage attribute) - rust-lang#129115 (Re-enable `dump-ice-to-disk` for Windows) - rust-lang#129164 (Use `ar_archive_writer` for writing COFF import libs on all backends) - rust-lang#129167 (mir/pretty: use `Option` instead of `Either<Once, Empty>`) - rust-lang#129168 (Return correct HirId when finding body owner in diagnostics) - rust-lang#129173 (Fix `is_val_statically_known` for floats) - rust-lang#129185 (Port `run-make/libtest-json/validate_json.py` to Rust) r? `@ghost` `@rustbot` modify labels: rollup
tgross35
added a commit
to tgross35/rust
that referenced
this pull request
Aug 17, 2024
…=compiler-errors Fix `is_val_statically_known` for floats The LLVM intrinsic name for floats differs from the LLVM type name, so handle them explicitly. Also adds support for `f16` and `f128`. `f16`/`f128` tracking issue: rust-lang#116909
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Aug 17, 2024
Rollup of 6 pull requests Successful merges: - rust-lang#128771 (Stabilize `unsafe_attributes`) - rust-lang#128982 (Re-enable more debuginfo tests on Windows) - rust-lang#129115 (Re-enable `dump-ice-to-disk` for Windows) - rust-lang#129173 (Fix `is_val_statically_known` for floats) - rust-lang#129185 (Port `run-make/libtest-json/validate_json.py` to Rust) - rust-lang#129190 (Added f16 and f128 to tests/ui/consts/const-float-bits-conv.rs) r? `@ghost` `@rustbot` modify labels: rollup
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Aug 18, 2024
Rollup of 5 pull requests Successful merges: - rust-lang#129164 (Use `ar_archive_writer` for writing COFF import libs on all backends) - rust-lang#129173 (Fix `is_val_statically_known` for floats) - rust-lang#129185 (Port `run-make/libtest-json/validate_json.py` to Rust) - rust-lang#129203 (Use cnum for extern crate data key) - rust-lang#129221 (Remove JohnTitor from review rotation) r? `@ghost` `@rustbot` modify labels: rollup
rust-timer
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Aug 18, 2024
Rollup merge of rust-lang#129173 - beetrees:statically-known-float, r=compiler-errors Fix `is_val_statically_known` for floats The LLVM intrinsic name for floats differs from the LLVM type name, so handle them explicitly. Also adds support for `f16` and `f128`. `f16`/`f128` tracking issue: rust-lang#116909
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
The LLVM intrinsic name for floats differs from the LLVM type name, so handle them explicitly. Also adds support for
f16andf128.f16/f128tracking issue: #116909