@@ -1688,11 +1688,8 @@ pub enum InferTy {
16881688 /// unbound type variable. This is convenient for caching etc. See
16891689 /// `middle::infer::freshen` for more details.
16901690 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.
16951691 FreshIntTy ( u32 ) ,
1692+ FreshFloatTy ( u32 )
16961693}
16971694
16981695#[ derive( Clone , RustcEncodable , RustcDecodable , PartialEq , Eq , Hash , Debug , Copy ) ]
@@ -1764,6 +1761,7 @@ impl fmt::Debug for InferTy {
17641761 FloatVar ( ref v) => v. fmt ( f) ,
17651762 FreshTy ( v) => write ! ( f, "FreshTy({:?})" , v) ,
17661763 FreshIntTy ( v) => write ! ( f, "FreshIntTy({:?})" , v) ,
1764+ FreshFloatTy ( v) => write ! ( f, "FreshFloatTy({:?})" , v)
17671765 }
17681766 }
17691767}
@@ -3765,7 +3763,7 @@ pub fn type_contents<'tcx>(cx: &ctxt<'tcx>, ty: Ty<'tcx>) -> TypeContents {
37653763 }
37663764
37673765 // Scalar and unique types are sendable, and durable
3768- ty_infer( ty:: FreshIntTy ( _) ) |
3766+ ty_infer( ty:: FreshIntTy ( _) ) | ty_infer ( ty :: FreshFloatTy ( _ ) ) |
37693767 ty_bool | ty_int( _) | ty_uint( _) | ty_float( _) |
37703768 ty_bare_fn( ..) | ty:: ty_char => {
37713769 TC :: None
@@ -4315,6 +4313,7 @@ pub fn type_is_fresh(ty: Ty) -> bool {
43154313 match ty. sty {
43164314 ty_infer( FreshTy ( _) ) => true ,
43174315 ty_infer( FreshIntTy ( _) ) => true ,
4316+ ty_infer( FreshFloatTy ( _) ) => true ,
43184317 _ => false
43194318 }
43204319}
@@ -5016,6 +5015,7 @@ pub fn ty_sort_string<'tcx>(cx: &ctxt<'tcx>, ty: Ty<'tcx>) -> String {
50165015 ty_infer( FloatVar ( _) ) => "floating-point variable" . to_string ( ) ,
50175016 ty_infer( FreshTy ( _) ) => "skolemized type" . to_string ( ) ,
50185017 ty_infer( FreshIntTy ( _) ) => "skolemized integral type" . to_string ( ) ,
5018+ ty_infer( FreshFloatTy ( _) ) => "skolemized floating-point type" . to_string ( ) ,
50195019 ty_projection( _) => "associated type" . to_string ( ) ,
50205020 ty_param( ref p) => {
50215021 if p. space == subst:: SelfSpace {
0 commit comments