about summary refs log tree commit diff
path: root/compiler/rustc_pattern_analysis/src
diff options
context:
space:
mode:
authorTrevor Gross <tmgross@umich.edu>2024-02-28 03:44:23 -0500
committerTrevor Gross <tmgross@umich.edu>2024-02-28 12:58:32 -0500
commite3f63d93755f2f62b4a52686f608b9664e87f092 (patch)
tree6d29765020fdfbd6bd2d049b5079baa83c4a4382 /compiler/rustc_pattern_analysis/src
parentef324565d071c6d7e2477a195648549e33d6a465 (diff)
downloadrust-e3f63d93755f2f62b4a52686f608b9664e87f092.tar.gz
rust-e3f63d93755f2f62b4a52686f608b9664e87f092.zip
Add `f16` and `f128` to `rustc_type_ir::FloatTy` and `rustc_abi::Primitive`
Make changes necessary to support these types in the compiler.
Diffstat (limited to 'compiler/rustc_pattern_analysis/src')
-rw-r--r--compiler/rustc_pattern_analysis/src/rustc.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/compiler/rustc_pattern_analysis/src/rustc.rs b/compiler/rustc_pattern_analysis/src/rustc.rs
index 5b62731e202..bf29bc04ebc 100644
--- a/compiler/rustc_pattern_analysis/src/rustc.rs
+++ b/compiler/rustc_pattern_analysis/src/rustc.rs
@@ -625,6 +625,7 @@ impl<'p, 'tcx: 'p> RustcMatchCheckCtxt<'p, 'tcx> {
                         let lo = lo.as_finite().map(|c| c.eval_bits(cx.tcx, cx.param_env));
                         let hi = hi.as_finite().map(|c| c.eval_bits(cx.tcx, cx.param_env));
                         match fty {
+                            ty::FloatTy::F16 => unimplemented!("f16_f128"),
                             ty::FloatTy::F32 => {
                                 use rustc_apfloat::ieee::Single;
                                 let lo = lo.map(Single::from_bits).unwrap_or(-Single::INFINITY);
@@ -637,6 +638,7 @@ impl<'p, 'tcx: 'p> RustcMatchCheckCtxt<'p, 'tcx> {
                                 let hi = hi.map(Double::from_bits).unwrap_or(Double::INFINITY);
                                 F64Range(lo, hi, end)
                             }
+                            ty::FloatTy::F128 => unimplemented!("f16_f128"),
                         }
                     }
                     _ => bug!("invalid type for range pattern: {}", ty.inner()),