-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Refactor float Primitive
s to a separate Float
type
#124797
Conversation
r? @davidtwco rustbot has assigned @davidtwco. Use |
Some changes occurred in compiler/rustc_codegen_gcc Some changes occurred in compiler/rustc_codegen_cranelift cc @bjorn3 |
This comment has been minimized.
This comment has been minimized.
rust-analyzer is developed in its own repository. If possible, consider making this change to rust-lang/rust-analyzer instead. cc @rust-lang/rust-analyzer |
This comment has been minimized.
This comment has been minimized.
@bors r+ rollup |
…iaskrgr Rollup of 5 pull requests Successful merges: - rust-lang#124615 (coverage: Further simplify extraction of mapping info from MIR) - rust-lang#124778 (Fix parse error message for meta items) - rust-lang#124797 (Refactor float `Primitive`s to a separate `Float` type) - rust-lang#124888 (Migrate `run-make/rustdoc-output-path` to rmake) - rust-lang#124957 (Make `Ty::builtin_deref` just return a `Ty`) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#124797 - beetrees:primitive-float, r=davidtwco Refactor float `Primitive`s to a separate `Float` type Now there are 4 of them, it makes sense to refactor `F16`, `F32`, `F64` and `F128` out of `Primitive` and into a separate `Float` type (like integers already are). This allows patterns like `F16 | F32 | F64 | F128` to be simplified into `Float(_)`, and is consistent with `ty::FloatTy`. As a side effect, this PR also makes the `Ty::primitive_size` method work with `f16` and `f128`. Tracking issue: rust-lang#116909 `@rustbot` label +F-f16_and_f128
Refactor float `Primitive`s to a separate `Float` type Now there are 4 of them, it makes sense to refactor `F16`, `F32`, `F64` and `F128` out of `Primitive` and into a separate `Float` type (like integers already are). This allows patterns like `F16 | F32 | F64 | F128` to be simplified into `Float(_)`, and is consistent with `ty::FloatTy`. As a side effect, this PR also makes the `Ty::primitive_size` method work with `f16` and `f128`. Tracking issue: rust-lang#116909 `@rustbot` label +F-f16_and_f128
…iaskrgr Rollup of 5 pull requests Successful merges: - rust-lang#124615 (coverage: Further simplify extraction of mapping info from MIR) - rust-lang#124778 (Fix parse error message for meta items) - rust-lang#124797 (Refactor float `Primitive`s to a separate `Float` type) - rust-lang#124888 (Migrate `run-make/rustdoc-output-path` to rmake) - rust-lang#124957 (Make `Ty::builtin_deref` just return a `Ty`) r? `@ghost` `@rustbot` modify labels: rollup
Now there are 4 of them, it makes sense to refactor
F16
,F32
,F64
andF128
out ofPrimitive
and into a separateFloat
type (like integers already are). This allows patterns likeF16 | F32 | F64 | F128
to be simplified intoFloat(_)
, and is consistent withty::FloatTy
.As a side effect, this PR also makes the
Ty::primitive_size
method work withf16
andf128
.Tracking issue: #116909
@rustbot label +F-f16_and_f128