@@ -1688,11 +1688,8 @@ pub enum InferTy {
1688
1688
/// unbound type variable. This is convenient for caching etc. See
1689
1689
/// `middle::infer::freshen` for more details.
1690
1690
FreshTy ( u32 ) ,
1691
-
1692
- // FIXME -- once integral fallback is impl'd, we should remove
1693
- // this type. It's only needed to prevent spurious errors for
1694
- // integers whose type winds up never being constrained.
1695
1691
FreshIntTy ( u32 ) ,
1692
+ FreshFloatTy ( u32 )
1696
1693
}
1697
1694
1698
1695
#[ derive( Clone , RustcEncodable , RustcDecodable , PartialEq , Eq , Hash , Debug , Copy ) ]
@@ -1764,6 +1761,7 @@ impl fmt::Debug for InferTy {
1764
1761
FloatVar ( ref v) => v. fmt ( f) ,
1765
1762
FreshTy ( v) => write ! ( f, "FreshTy({:?})" , v) ,
1766
1763
FreshIntTy ( v) => write ! ( f, "FreshIntTy({:?})" , v) ,
1764
+ FreshFloatTy ( v) => write ! ( f, "FreshFloatTy({:?})" , v)
1767
1765
}
1768
1766
}
1769
1767
}
@@ -3765,7 +3763,7 @@ pub fn type_contents<'tcx>(cx: &ctxt<'tcx>, ty: Ty<'tcx>) -> TypeContents {
3765
3763
}
3766
3764
3767
3765
// Scalar and unique types are sendable, and durable
3768
- ty_infer( ty:: FreshIntTy ( _) ) |
3766
+ ty_infer( ty:: FreshIntTy ( _) ) | ty_infer ( ty :: FreshFloatTy ( _ ) ) |
3769
3767
ty_bool | ty_int( _) | ty_uint( _) | ty_float( _) |
3770
3768
ty_bare_fn( ..) | ty:: ty_char => {
3771
3769
TC :: None
@@ -4315,6 +4313,7 @@ pub fn type_is_fresh(ty: Ty) -> bool {
4315
4313
match ty. sty {
4316
4314
ty_infer( FreshTy ( _) ) => true ,
4317
4315
ty_infer( FreshIntTy ( _) ) => true ,
4316
+ ty_infer( FreshFloatTy ( _) ) => true ,
4318
4317
_ => false
4319
4318
}
4320
4319
}
@@ -5016,6 +5015,7 @@ pub fn ty_sort_string<'tcx>(cx: &ctxt<'tcx>, ty: Ty<'tcx>) -> String {
5016
5015
ty_infer( FloatVar ( _) ) => "floating-point variable" . to_string ( ) ,
5017
5016
ty_infer( FreshTy ( _) ) => "skolemized type" . to_string ( ) ,
5018
5017
ty_infer( FreshIntTy ( _) ) => "skolemized integral type" . to_string ( ) ,
5018
+ ty_infer( FreshFloatTy ( _) ) => "skolemized floating-point type" . to_string ( ) ,
5019
5019
ty_projection( _) => "associated type" . to_string ( ) ,
5020
5020
ty_param( ref p) => {
5021
5021
if p. space == subst:: SelfSpace {
0 commit comments