Skip to content

Commit 06f1ba4

Browse files
committed
Auto merge of #124972 - matthiaskrgr:rollup-3fablim, r=matthiaskrgr
Rollup of 5 pull requests Successful merges: - #124615 (coverage: Further simplify extraction of mapping info from MIR) - #124778 (Fix parse error message for meta items) - #124797 (Refactor float `Primitive`s to a separate `Float` type) - #124888 (Migrate `run-make/rustdoc-output-path` to rmake) - #124957 (Make `Ty::builtin_deref` just return a `Ty`) r? `@ghost` `@rustbot` modify labels: rollup
2 parents 7ad7346 + ce11a86 commit 06f1ba4

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

src/type_of.rs

+3-6
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ use rustc_middle::ty::print::with_no_trimmed_paths;
88
use rustc_middle::ty::{self, Ty, TypeVisitableExt};
99
use rustc_target::abi::call::{CastTarget, FnAbi, Reg};
1010
use rustc_target::abi::{
11-
self, Abi, Align, FieldsShape, Int, Integer, PointeeInfo, Pointer, Size, TyAbiInterface,
12-
Variants, F128, F16, F32, F64,
11+
self, Abi, Align, FieldsShape, Float, Int, Integer, PointeeInfo, Pointer, Size, TyAbiInterface,
12+
Variants,
1313
};
1414

1515
use crate::abi::{FnAbiGcc, FnAbiGccExt, GccType};
@@ -283,10 +283,7 @@ impl<'tcx> LayoutGccExt<'tcx> for TyAndLayout<'tcx> {
283283
match scalar.primitive() {
284284
Int(i, true) => cx.type_from_integer(i),
285285
Int(i, false) => cx.type_from_unsigned_integer(i),
286-
F16 => cx.type_f16(),
287-
F32 => cx.type_f32(),
288-
F64 => cx.type_f64(),
289-
F128 => cx.type_f128(),
286+
Float(f) => cx.type_from_float(f),
290287
Pointer(address_space) => {
291288
// If we know the alignment, pick something better than i8.
292289
let pointee = if let Some(pointee) = self.pointee_info_at(cx, offset) {

0 commit comments

Comments
 (0)