File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -132,6 +132,8 @@ bitflags::bitflags! {
132132 #[ derive( Default ) ]
133133 pub ( crate ) struct TypeVariableFlags : u8 {
134134 const DIVERGING = 1 << 0 ;
135+ const INTEGER = 1 << 1 ;
136+ const FLOAT = 1 << 2 ;
135137 }
136138}
137139
@@ -258,8 +260,14 @@ impl<'a> InferenceTable<'a> {
258260 // Chalk might have created some type variables for its own purposes that we don't know about...
259261 self . extend_type_variable_table ( var. index ( ) as usize ) ;
260262 assert_eq ! ( var. index( ) as usize , self . type_variable_table. len( ) - 1 ) ;
263+ let flags = self . type_variable_table . get_mut ( var. index ( ) as usize ) . unwrap ( ) ;
261264 if diverging {
262- self . type_variable_table [ var. index ( ) as usize ] |= TypeVariableFlags :: DIVERGING ;
265+ * flags |= TypeVariableFlags :: DIVERGING ;
266+ }
267+ if matches ! ( kind, TyVariableKind :: Integer ) {
268+ * flags |= TypeVariableFlags :: INTEGER ;
269+ } else if matches ! ( kind, TyVariableKind :: Float ) {
270+ * flags |= TypeVariableFlags :: FLOAT ;
263271 }
264272 var. to_ty_with_kind ( Interner , kind)
265273 }
You can’t perform that action at this time.
0 commit comments