@@ -1697,11 +1697,8 @@ pub enum InferTy {
1697
1697
/// unbound type variable. This is convenient for caching etc. See
1698
1698
/// `middle::infer::freshen` for more details.
1699
1699
FreshTy ( u32 ) ,
1700
-
1701
- // FIXME -- once integral fallback is impl'd, we should remove
1702
- // this type. It's only needed to prevent spurious errors for
1703
- // integers whose type winds up never being constrained.
1704
1700
FreshIntTy ( u32 ) ,
1701
+ FreshFloatTy ( u32 )
1705
1702
}
1706
1703
1707
1704
#[ derive( Clone , RustcEncodable , RustcDecodable , PartialEq , Eq , Hash , Debug , Copy ) ]
@@ -1773,6 +1770,7 @@ impl fmt::Debug for InferTy {
1773
1770
FloatVar ( ref v) => v. fmt ( f) ,
1774
1771
FreshTy ( v) => write ! ( f, "FreshTy({:?})" , v) ,
1775
1772
FreshIntTy ( v) => write ! ( f, "FreshIntTy({:?})" , v) ,
1773
+ FreshFloatTy ( v) => write ! ( f, "FreshFloatTy({:?})" , v)
1776
1774
}
1777
1775
}
1778
1776
}
@@ -3775,7 +3773,7 @@ pub fn type_contents<'tcx>(cx: &ctxt<'tcx>, ty: Ty<'tcx>) -> TypeContents {
3775
3773
}
3776
3774
3777
3775
// Scalar and unique types are sendable, and durable
3778
- ty_infer( ty:: FreshIntTy ( _) ) |
3776
+ ty_infer( ty:: FreshIntTy ( _) ) | ty_infer ( ty :: FreshFloatTy ( _ ) ) |
3779
3777
ty_bool | ty_int( _) | ty_uint( _) | ty_float( _) |
3780
3778
ty_bare_fn( ..) | ty:: ty_char => {
3781
3779
TC :: None
@@ -4325,6 +4323,7 @@ pub fn type_is_fresh(ty: Ty) -> bool {
4325
4323
match ty. sty {
4326
4324
ty_infer( FreshTy ( _) ) => true ,
4327
4325
ty_infer( FreshIntTy ( _) ) => true ,
4326
+ ty_infer( FreshFloatTy ( _) ) => true ,
4328
4327
_ => false
4329
4328
}
4330
4329
}
@@ -5026,6 +5025,7 @@ pub fn ty_sort_string<'tcx>(cx: &ctxt<'tcx>, ty: Ty<'tcx>) -> String {
5026
5025
ty_infer( FloatVar ( _) ) => "floating-point variable" . to_string ( ) ,
5027
5026
ty_infer( FreshTy ( _) ) => "skolemized type" . to_string ( ) ,
5028
5027
ty_infer( FreshIntTy ( _) ) => "skolemized integral type" . to_string ( ) ,
5028
+ ty_infer( FreshFloatTy ( _) ) => "skolemized floating-point type" . to_string ( ) ,
5029
5029
ty_projection( _) => "associated type" . to_string ( ) ,
5030
5030
ty_param( ref p) => {
5031
5031
if p. space == subst:: SelfSpace {
0 commit comments